'Laratrust seed is not working as expected

Hello World

I tried to use Laratrust for one of my projects and after I follow all the steps but I can't see any user in my databse.

I followed all the steps from here and here but I haven't found yet why there's no superadministrator or administrator in my database.

The commands I used in order to install and go with Laratrust:

composer require "santigarcor/laratrust:5.0.*"

php artisan vendor:publish --tag="laratrust"

php artisan laratrust:setup

composer dump-autoload

php artisan laratrust:migration

php artisan migrate

php artisan laratrust:seeder

composer dump-autoload

I also wrote php artisan db:seed but still nothing.

enter image description here

Thank you for your answers and sorry if my question is not really plausible.



Solution 1:[1]

Go to your database/seeds/DatabaseSeeder.php and add this in the run() method:

public function run()
{
    // ...

    $this->call(LaratrustSeeder::class);
}

Then, don't forget to modify the generate seeder creator config/laratrust_seeder.php to customize the seeder.

Solution 2:[2]

edit config/laratrust_seeder.php.

  • Change 'create_users' => false, to 'create_users' => true,

thank me later mate

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kenny Horna
Solution 2 It's VIN