mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
feat: add redirect to drive files
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\GoogleDriveFile;
|
||||
use Illuminate\Http\Request;
|
||||
use Redirect;
|
||||
|
||||
class FilesController extends Controller
|
||||
{
|
||||
@@ -85,13 +86,14 @@ class FilesController extends Controller
|
||||
|
||||
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é');
|
||||
// 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é');
|
||||
return Redirect::away('https://drive.google.com/drive/folders/1iL_mMKMMAzyR203ni3HCPrU-ohCAel5S');
|
||||
}
|
||||
|
||||
public function instruction()
|
||||
|
||||
Reference in New Issue
Block a user