Hi, I am trying to use db:seed but every time I run it i get [Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected ';', expecting function (T_FUNCTION)
<?php
use Illuminate\Database\Seeder;
class UserTableSeeder extends Seeder
{
public function run()
{
factory(App\User::class, 50)->create();
}
}
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call('UserTableSeeder');
Model::reguard();
}
}
Can anyone tell me what is wrong with please? Cuz I wasted 2 ours for searching errors and there is still no result.
please post the full error trace. it's possible that you have missed a } somewhere.
astroanu
This is the full stack! The point is that there are so little info in console that I can't even figure out what a hack is going on.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community