Firstly i was getting an error in
php artisan migrate
as
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
and Then i found a post on laracasts
to fix this as
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
After adding this, when i run
php artisan optimize
then i am presented with new error as below
Call to undefined method Illuminate\Database\Schema\MySqlBuilder::defaultStringLength()
Please assist in getting rid of all these errors.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire