mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-22 11:09:11 -04:00
filesysteme
This commit is contained in:
58
app/Console/Commands/initDrive.php
Normal file
58
app/Console/Commands/initDrive.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Contracts\Filesystem\Cloud;
|
||||
|
||||
class initDrive extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'drive:init';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Initialize drive';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
\Storage::cloud()->createDir('Systeme');
|
||||
\Storage::cloud()->createDir('Systeme/Fichier');
|
||||
\Storage::cloud()->createDir('Systeme/Fichier/PlanDeCours');
|
||||
\Storage::cloud()->createDir('Systeme/Fichier/MessageDeLaSemaine');
|
||||
\Storage::cloud()->createDir('Prive');
|
||||
\Storage::cloud()->createDir('Prive/Cadet');
|
||||
\Storage::cloud()->createDir('Prive/ETAMAS');
|
||||
\Storage::cloud()->createDir('Prive/Officier');
|
||||
\Storage::cloud()->createDir('Prive/Staff');
|
||||
\Storage::cloud()->createDir('Prive/Staff/Guide');
|
||||
\Storage::cloud()->createDir('Prive/Staff/Instruction');
|
||||
\Storage::cloud()->createDir('Publique');
|
||||
\Storage::cloud()->createDir('Publique/Fichier');
|
||||
\Storage::cloud()->createDir('Publique/Image');
|
||||
|
||||
return "Drive is initialized";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user