database/seeders/SeederTablaPermisos.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $permisos = [
            'ver-rol',
            'crear-rol',
            'editar-rol',
            'borrar-rol',
            'ver-blog',
            'crear-blog',
            'editar-blog',
            'borrar-blog',
        ];
        foreach ($permisos as $permiso) {
            Permission::create(['name' => $permiso]);
        }
    }
public function run ( ) { $ permisos = [ 'ver-rol' , 'crear-rol' , 'editar-rol' , 'borrar-rol' , 'ver-blog' , 'crear-blog' , 'editar-blog' , 'borrar-blog' , ] ; foreach ( $ permisos as $ permiso ) { Permission :: create ( [ 'name' => $ permiso ] ) ; } }
Run the database seeds.
Run the database seeds .
//tabla roles //tabla alumnos // se añade los datos anteriores a la tabla