database/seeders/CreateRoleSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $roles = [
          "adminStructure"  =>   [
              "name" => "Admin_structure",
              "libelle" => "Admin structure",
             ],
          "PointFocal"  => [
                "name" => "Point_focal",
                "libelle" => "Point Focal",
             ],
         ];
         foreach ($roles as $role) {
              Role::create(["name" => $role["name"], "libelle" => $role["libelle"]]);
         }
    }
public function run ( ) { $ roles = [ " adminStructure " => [ " name " => " Admin_structure " , " libelle " => " Admin structure " , ] , " PointFocal " => [ " name " => " Point_focal " , " libelle " => " Point Focal " , ] , ] ; foreach ( $ roles as $ role ) { Role :: create ( [ " name " => $ role [ " name " ] , " libelle " => $ role [ " libelle " ] ] ) ; } }
Run the database seeds.
Run the database seeds .