public function addPermission(Request $request)
    {
        $user = \App\User::findorfail($request->user_id);
        $user->givePermissionTo($request->permission_name);

        return redirect('scaffold-users/edit/'.$request->user_id);
    }
public function addPermission(Request $request)
    {
        $user = \App\User::findorfail($request->user_id);
        $user->givePermissionTo($request->permission_name);

        return redirect('scaffold-users/edit/'.$request->user_id);
    }
public function addPermission ( Request $ request ) { $ user = \ App \ User :: findorfail ( $ request -> user_id ) ; $ user -> givePermissionTo ( $ request -> permission_name ) ; return redirect ( 'scaffold-users/edit/' . $ request -> user_id ) ; }
Assign Permission to a user.

@param \Illuminate\Http\Request

@return \Illuminate\Http\Response
Assign Permission to a user .