2019-11-16 10:21:14 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
|
|
|
class UserSeed extends Command
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name and signature of the console command.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $signature = 'user:seed {user} {company}';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $description = 'Seed for specific user';
|
2020-02-03 18:57:31 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
2020-02-07 12:44:26 +03:00
|
|
|
$class = $this->laravel->make('Database\Seeds\User');
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2020-02-07 12:44:26 +03:00
|
|
|
$class->setContainer($this->laravel)->setCommand($this)->__invoke();
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|
|
|
|
}
|