Files
c-cms-legacy/app/Console/Commands/initDrive.php
Mathieu Lagacé b3f471e6e9 filesysteme
2020-09-12 10:13:21 -04:00

59 lines
1.5 KiB
PHP

<?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";
}
}