lundi 28 novembre 2016

how can I update My values using Laravel 5.2

this is My addpermission function in My Controller, I need update function here to update values. how can I put update codes here. (I need update function in same addpermission function)

public function addPermission(Request $request, $id,  Permission $permission)
    {
         $this->validate($request, [
            'status'   => 'required'


        ]);

        $permission = new Permission;

        $permission->status = $request->input('status');
        $permission->project_id       = $id;
        $permission->collaborator_id =  $request->input('cid');
        $permission->save();
        return redirect()->back()->with('info','Permission has been added to your Collaborator successfully');
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire