Categories
Laravel Samuel

Random laravel notes

kept running into this strange error for a few minutes tonight, but finally got to the bottom of it.

if you are getting “reflectionException” “controllerName does not exists” this is because you already have the controller created in your route.php file. Remove it from routes.php (or comment it out the save). Now run the command again and it will succeed.

 

how to make laravel controllers via command line:

controller:make MarketingController

when there is a conflict in tortise git:

-click on the file in conflict, hit git stash
-pull down the new code
-right click on the white space in the folder (not on the actual file) hit stash pop (this will merge your stashed file with the new one)
-commit then push

 

if php artisan migrate is not working, just run php artisan migrate:refresh and it will run the latest migrations.

if you are running DB seeders and getting an error, to find out what file the error is in run: php artisan db:seed -v this will spit out the error info of what file the seeder breaks on and what line specifically breaks it.