function post()
 {
     $att = Attachment::find(Request::route('id3'));
     $pageId = Request::route('id1');
     $att->delete();
     return Redirect::to("/admin/manage-pages/{$pageId}/content");
 }
Пример #2
0
 function download()
 {
     $att = Attachment::find(Request::route("id2"));
     return response()->download("{$att->value}");
 }
 function currentAttachment()
 {
     $attId = Request::route('id3');
     if (isset($attId)) {
         return Attachment::find($attId);
     } else {
         return null;
     }
 }