38 lines
707 B
PHP
38 lines
707 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class Import extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'import {dir}';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Import data from gzipped backup init files';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$dir = $this->argument('dir');
|
|
|
|
$files = Storage::disk('loacl')->files($dir);
|
|
|
|
foreach ($files as $file) {
|
|
var_dump($file);
|
|
}
|
|
}
|
|
}
|