mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
59 lines
1.5 KiB
PHP
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";
|
|
}
|
|
}
|