/** * Display a listing of the resource. * * @return Response */ public function index() { $items = Attachment::orderBy('name', 'ASC')->paginate(50); // $items = Attachment::where('mime', '!=', 'text/plain')->orderBy('name', 'ASC')->paginate(50); $search = ''; // $lectures = Attachment::orderBy('name', 'ASC')->paginate(50); return View::make('attachment.view_attachment', compact('items', 'search')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $attachments = Attachment::orderBy('id', 'desc')->paginate(25); $uploads = DB::table('uploads')->select('name', 'owner', 'md5', 'sha1')->where('owner', Auth::user()->username)->orderBy('updated_at', 'desc')->paginate(25); $alluploads = DB::table('uploads')->select('name', 'owner', 'md5', 'sha1')->orderBy('updated_at', 'desc')->paginate(25); $attachmentsCount = count($attachments); $uploadsCount = count($uploads); $alluploadsCount = count($alluploads); return View::make('attachments.index', ['attachments' => $attachments, 'uploads' => $uploads, 'alluploads' => $alluploads, 'attachmentsCount' => $attachmentsCount, 'uploadsCount' => $uploadsCount, 'alluploadsCount' => $alluploadsCount]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return View::make('attachments.index', ['attachments' => Attachment::orderBy('id', 'desc')->paginate(25)]); }
protected static function getAttachments($range) { return []; $id = intval($range); if ($id != 0) { return Logbook::find($id)->user->attachments; } return Attachment::orderBy('id', 'asc')->get(); }