middleware(function ($request, $next) { $this->user = Auth::guard('web')->user(); return $next($request); }); addVendor('chained-select'); } /** * Display a listing of the resource. */ public function index(FileManagementDataTable $dataTable) { if (is_null($this->user) || !$this->user->can('document.read')) { abort(403, 'Sorry !! You are Unauthorized to view any master data !'); } return $dataTable->render('cetaklabel::app.filemanager.index'); } /** * Display a listing of the resource. */ public function dus(DusDataTable $dataTable) { if (is_null($this->user) || !$this->user->can('document.read')) { abort(403, 'Sorry !! You are Unauthorized to view any master data !'); } return $dataTable->render('cetaklabel::app.filemanager.dus'); } /** * Display a listing of the resource. */ public function dusList(Request $request) { header("Content-Type: application/vnd.ms-excel; charset=utf-8"); header("Content-Disposition: attachment; filename=list-document-dus.xls"); //File name extension was wrong header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); $documents = DocumentDetail::all(); return view('cetaklabel::app.filemanager.dus-list', compact('documents')); } /** * Display a listing of the resource. */ public function odner(OdnerDataTable $dataTable) { if (is_null($this->user) || !$this->user->can('document.read')) { abort(403, 'Sorry !! You are Unauthorized to view any master data !'); } return $dataTable->render('cetaklabel::app.filemanager.odner'); } /** * Display a listing of the resource. */ public function odnerList(Request $request) { header("Content-Type: application/vnd.ms-excel; charset=utf-8"); header("Content-Disposition: attachment; filename=list-document-dus.xls"); //File name extension was wrong header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); $document = Document::where('kode_odner', $request->id)->first(); $documents = DocumentDetail::where('document_id', $document->id)->get(); return view('cetaklabel::app.filemanager.dus-list', compact('documents')); } /** * Display a listing of the resource. */ public function list(ListsDataTable $dataTable) { if (is_null($this->user) || !$this->user->can('document.read')) { abort(403, 'Sorry !! You are Unauthorized to view any master data !'); } return $dataTable->render('cetaklabel::app.filemanager.list'); } /** * Show the form for creating a new resource. * * @return Renderable */ public function create() { return view('cetaklabel::create'); } /** * Store a newly created resource in storage. * * @param Request $request * * @return Renderable */ public function store(Request $request) { // } /** * Show the specified resource. * * @param int $id * * @return Renderable */ public function show($id) { return view('cetaklabel::show'); } /** * Show the form for editing the specified resource. * * @param int $id * * @return Renderable */ public function edit($id) { return view('cetaklabel::edit'); } /** * Update the specified resource in storage. * * @param Request $request * @param int $id * * @return Renderable */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * * @return Renderable */ public function destroy($id) { // } }