While creating migration scripts I can do something like this
Schema::table('books', function(Blueprint $table)
{
$table->string('reference')->after('access');
});
this will create my reference column after access column. But if I want to use morph how would I do this. I was thinking of doing this
Schema::table('books', function(Blueprint $table)
{
$table->morphs('reference')->after('access');
});
However, this gives me a migration error when I try to run the migration. This is because morphs doesn't have a after
method. I am using laravel 5.1. I am not sure how I could have the reference columns after access. Any help or suggestion would be great. Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire