#laravelissues
This is an assortment of errors that I've encountered while learning Laravel and Homestead. I started writing them all down just in case I encounter them again and can't remember what to do. Hopefully this helps anyone trying to learn Laravel and Homestead.
This solution fixed it for me
Set port to 33060
in database config files
Change the connection port from 3306
to 33060
in MySQL Workbench
Run bash init.sh
after every change made to homestead.yaml because it updates ~/.homestead/homestead.yaml
which is where the VM really gets its config from.
Set the site mapping to the public directory of where laravel is installed. e.g.
sites:
- map: blog.app
to: /home/vagrant/Websites/blog/public
Set debug to false in both app/config/app.php
AND app/config/local/app.php
Replace '127.0.0.1'
to 'localhost'
in database config
Make sure foreign key and primary key have the same data type
Use DB::table
instead of Schema::table
Run composer require "Illuminate/html"
in the command line, and add 'Illuminate\Html\HtmlServiceProvider'
to service providers in /config/app.php
Use {!! Form::token() !!}
to not escape characters. "Illuminate html with V5"
Change 'action' => 'articles.edit'
to 'route' => 'articles.edit'
Upgraded box Laravel/Homestead
and it wouldn't boot up. Deleting the VM in VirtualBox and re-installing the box had no effect.
Not sure why this happened, but deleting ~/VirtualBox VMs/homestead
ended up fixing it. This caused data loss in MySQL, however, so I had to re-configure MySQL and re-migrate.
Return true
from EditArticleRequest.authorize method, ya dummy.