Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Flex's avatar
Level 4

Not Sucessfully Seeding Tables when seeding in Laravel 7 with Laratrust

working with Laravel 7 and authenticating system Laratrust 6 and have tried seeding the tables. it has executed with some data tables with data but 3 tables did not seed. users,role_user,permission_user how could I fix this problem? my DatabaseSeeder.php file is like this

<?php
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
   public function run()
    {
        
        $this->call(LaratrustSeeder::class); 
        }
}
0 likes
1 reply
Wakanda's avatar

include table seeders in your database seeder

<?php
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
   public function run()
    {
        
        $this->call(LaratrustSeeder::class); 
 	$this->call(PermissionTableSeeder::class); 
 	$this->call(UsersTableSeeder::class); 
        }
}
1 like

Please or to participate in this conversation.