app/Http/Controllers/seguridad/PermisosController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $this->validate($request, [
            'name' => 'required|max:255|unique:permissions,name',
            'guard_name' => 'required|max:255'
        ]);
        $permisos = Permission::create(['name' => $request->input('name'),
                                'guard_name' => $request->input('guard_name')]);
        $esabm = true;
        return redirect()->route('permisos.index',compact('esabm'))
                        ->with('flash_message','Permiso creado correctamente');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required|max:255|unique:permissions,name' , 'guard_name' => 'required|max:255' ] ) ; $ permisos = Permission :: create ( [ 'name' => $ request -> input ( 'name' ) , 'guard_name' => $ request -> input ( 'guard_name' ) ] ) ; $ esabm = true ; return redirect ( ) -> route ( 'permisos.index' , compact ( 'esabm' ) ) -> with ( 'flash_message' , 'Permiso creado correctamente' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//$permisos->syncPermissions($request->input('permission'));