Skip to content

Tag: laravel

Download .mp4 from URL using Laravel

How to download .m4v video from given URL with Laravel? I have a URL for example rtmp://123456.r.cdnsun.net/_definst_/mp4:123456/h264/123456.m4v … Can you recommend me a package for Laravel which could make the process easier? Answer It depends on what exactly you’re trying to achieve. For example…

How to correctly set a JWT secret in Laravel with jwt-auth?

I’d like to test the authentication of JWTs in my project as the JWTs will be sent from outside the app, and so they must be signed using the key from my application. Is this possible? Does anyone know of a site that allows you to sign a token using a secret? I tried http://jwtbuilder.jamiekurtz.com/ bu…

Laravel – unsigned with nullable

I am using Laravel 5.3, I want to define a field in table migration as nullable as well as unsigned. As both are index modifier, can I use them in concatenation ? Like: Please also give some reference if there is to these kind of modifications in laravel documentation or somewhere. Please note that I want to …

Detect emoticons in string

I found that you need PHP 7 and MySQL 5.5 to use emoticons in a string that you want to upload to the database. I don’t have these specification on my server so I want to give an error message in laravel or php. Is there a way to detect emoticons in php? If so then I can create a

Laravel casts with relation

I’m making a survey website where users provide answers from 0 to 10. I was experimenting with the casts to store all questions and the answer in 1 row. This is what the scores field looks like in the database This is as expected. The “5” and “6” are ID’s of the question an…

Call to a member function save() on array laravel

Im doing the update method. When I tried to update the specific data, im getting this error “Call to a member function save() on array”. Why? Is there’s something missing in my codes? I also tried to print_r the $result variable, it has a value.. View Controller Route Answer This way can hel…