public function getDelete($sid)
    {
        $image = Image::find($sid);
        
        if ($image == null) {
            $errors = new MessageBag;
            $errors->add('deleteError', trans('redminportal::messages.error_delete_image'));
            return redirect()->back()->withErrors($errors);
        }
        
        $image->delete();
        
        return redirect()->back();
    }
public function getDelete($sid)
    {
        $image = Image::find($sid);
        
        if ($image == null) {
            $errors = new MessageBag;
            $errors->add('deleteError', trans('redminportal::messages.error_delete_image'));
            return redirect()->back()->withErrors($errors);
        }
        
        $image->delete();
        
        return redirect()->back();
    }
public function getDelete ( $ sid ) { $ image = Image :: find ( $ sid ) ; if ( $ image == null ) { $ errors = new MessageBag ; $ errors -> add ( 'deleteError' , trans ( 'redminportal::messages.error_delete_image' ) ) ; return redirect ( ) -> back ( ) -> withErrors ( $ errors ) ; } $ image -> delete ( ) ; return redirect ( ) -> back ( ) ; }
Delete Image by ID

@param integer Image ID to be removed
Delete Image by ID