How to Create Multiple Where Clause Query Using Laravel Eloquent?

In Laravel 5.3 (and still true as of 7.x) you can use more granular wheres passed as an array: Personally I haven’t found use-case for this over just multiple where calls, but fact is you can use it. Since June 2014 you can pass an array to where As long as you want all the wheres use and operator, you can group them this way: … Read more

Why do I have to run “composer dump-autoload” command to make migrations work in laravel?

OK so I think i know the issue you’re having. Basically, because Composer can’t see the migration files you are creating, you are having to run the dump-autoload command which won’t download anything new, but looks for all of the classes it needs to include again. It just regenerates the list of all classes that … Read more

Laravel 5 MethodNotAllowedHttpException in RouteCollection.php line 201:

This is how I do it. Routes.php admin_login.blade.php dashboard.blade.php UsersController.php Your Code: In routes.php, you have only 1 route, i.e., And there is no declaration of post method, hence, the MethodNotAllowedHttpException Also, in your controller, you are returning the view first and then processing the form which is not going to work at all. You first need to process … Read more

Laravel 5 Class ‘Collective\Html\HtmlServiceProvider’ not found on AWS

When you update your composer it will check the providers. Because you haven’t installed laravelcollective/html yet he can’t find it and throws an error: So first require your packeges, then add them to the config file. You can also work with composer require laravelcollective/html, it will add it to the json file automatically. Then it doesn’t matter if … Read more

Facebook OAuth “The domain of this URL isn’t included in the app’s domain”

This usually happens if you have entered the wrong details when you created the App in Facebook. Or have you changed a URL’s of an existing App? Can you please recheck the settings of your APP in this page? https://developers.facebook.com/apps Select the correct App and click in the edit button; Check the URLs & paths … Read more

No Application Encryption Key Has Been Specified

From Encryption – Laravel – The PHP Framework For Web Artisans: “Before using Laravel’s encrypter, you must set a key option in your config/app.php configuration file. You should use the php artisan key:generate command to generate this key” I found that using this complex internet query in google.com: “laravel add encrption key” (Yes, it worked even with the … Read more