public function edit(Request $request)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Media', 'update')) {
            return $this->noPermission();
        }
        $media = Media::find($request->mediaID);
        $media->title = $request->title;
        $media->description = $request->description;
        $media->credit = $request->credit;

        if ($media->save()) {
            return "OK";
        }
        return "ERR";
    }
public function edit(Request $request)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Media', 'update')) {
            return $this->noPermission();
        }
        $media = Media::find($request->mediaID);
        $media->title = $request->title;
        $media->description = $request->description;
        $media->credit = $request->credit;

        if ($media->save()) {
            return "OK";
        }
        return "ERR";
    }
public function edit ( Request $ request ) { // check if user has permissions to access this link if ( ! User :: hasAccess ( 'Media' , 'update' ) ) { return $ this -> noPermission ( ) ; } $ media = Media :: find ( $ request -> mediaID ) ; $ media -> title = $ request -> title ; $ media -> description = $ request -> description ; $ media -> credit = $ request -> credit ; if ( $ media -> save ( ) ) { return "OK" ; } return "ERR" ; }
Edit a specific media file information.

@param  Request $request
@return array|string
Edit a specific media file information .