where('path','=',$path)->get()->all(); if ($file_rules != []) { dd($file_rules); } dd(dirname($path)); $path_rules = \DB::table('acl_rules')->where('path','=',dirname($path))->get()->all(); if ($path_rules != []) { } return abort(404); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } public function guide() { if (\App\GoogleDriveFile::checkConfig()) { $dirID = \App\GoogleDriveFile::findByPath('.Privé/.Staff/.Guide'); $dir = collect(\Storage::cloud()->listContents($dirID->id,false))->sortBy('name'); return view('admin.files.guide',['dir' => $dir]); } return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } public function instruction() { if (\App\GoogleDriveFile::checkConfig()) { return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff/.Instruction')->first()->id, 'mode' => 'folder']); } return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } public function cadet() { if (!\App\GoogleDriveFile::checkConfig()) { return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Cadet')->first()->id, 'mode' => 'folder']); } public function staff() { if (!\App\GoogleDriveFile::checkConfig()) { return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff')->first()->id, 'mode' => 'folder']); } public function etamas() { if (!\App\GoogleDriveFile::checkConfig()) { return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.ETAMAS')->first()->id, 'mode' => 'folder']); } public function officier() { if (!\App\GoogleDriveFile::checkConfig()) { return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Officier')->first()->id, 'mode' => 'folder']); } public function publique() { if (!\App\GoogleDriveFile::checkConfig()) { return redirect('/admin')->with('error','Google Drive n\'est pas configuré'); } return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Publique')->first()->id, 'mode' => 'folder']); } }