app/Http/Controllers/PermissionController.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|unique:permissions,name',
        ]);
        $permissions = Permission::create([
            'name' => $request->input('name')
        ]);
        return redirect()->route('permissions - create')->withStatus(__('Permissions Successfully Created.'));
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required|unique:permissions,name' , ] ) ; $ permissions = Permission :: create ( [ 'name' => $ request -> input ( 'name' ) ] ) ; return redirect ( ) -> route ( 'permissions - create' ) -> withStatus ( __ ( 'Permissions Successfully Created.' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .