src/Controllers/ScaffoldController.php
public function deleteAttachment($page, $id, $attachment)
    {
        $this->authorize('update', $eloquent = app('scaffold.model'));

        app('scaffold.actions')->exec('detachFile', [$eloquent, $attachment]);

        return back()->with('messages',
            [trans('administrator::messages.remove_success', ['item' => 'Attachment'])]);
    }
public function deleteAttachment($page, $id, $attachment)
    {
        $this->authorize('update', $eloquent = app('scaffold.model'));

        app('scaffold.actions')->exec('detachFile', [$eloquent, $attachment]);

        return back()->with('messages',
            [trans('administrator::messages.remove_success', ['item' => 'Attachment'])]);
    }
public function deleteAttachment ( $ page , $ id , $ attachment ) { $ this -> authorize ( 'update' , $ eloquent = app ( 'scaffold.model' ) ) ; app ( 'scaffold.actions' ) -> exec ( 'detachFile' , [ $ eloquent , $ attachment ] ) ; return back ( ) -> with ( 'messages' , [ trans ( 'administrator::messages.remove_success' , [ 'item' => 'Attachment' ] ) ] ) ; }
Destroy attachment.

@param $page
@param $id
@param $attachment

@return \Illuminate\Http\RedirectResponse
Destroy attachment .