database/seeders/RolesSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $roles = [
            [
                "name" => "owner",
                "display_name" => "Administrator",
                "description" => "This is the super admin role for owner",
            ],
            [
                "name" => "member",
                "display_name" => "Gym Member",
                "description" => "This role is for gym member",
            ],
            [
                "name" => "admin",
                "display_name" => "Gym Admin",
                "description" => "This role is for gym admin",
            ],
        ];
        foreach ($roles as $role) {
            Role::updateOrCreate($role);
        }
    }
public function run ( ) { $ roles = [ [ " name " => " owner " , " display_name " => " Administrator " , " description " => " This is the super admin role for owner " , ] , [ " name " => " member " , " display_name " => " Gym Member " , " description " => " This role is for gym member " , ] , [ " name " => " admin " , " display_name " => " Gym Admin " , " description " => " This role is for gym admin " , ] , ] ; foreach ( $ roles as $ role ) { Role :: updateOrCreate ( $ role ) ; } }
Run the database seeds.
Run the database seeds .