Adding app/Console/Commands/InstallLogo.php
This commit is contained in:
parent
1994f30f9e
commit
3e15982456
2 changed files with 39 additions and 0 deletions
37
app/Console/Commands/InstallLogo.php
Normal file
37
app/Console/Commands/InstallLogo.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class InstallLogo extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'install:logo {name}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'install logo';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$filename = $this->argument('name') . '.png';
|
||||
|
||||
Storage::disk('resources')->copy('logos/' . $filename, 'images/logo.png');
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@ class Kernel extends ConsoleKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
Commands\InstallLogo::class,
|
||||
|
||||
Commands\CardImport::class,
|
||||
Commands\CardExport::class,
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue