Generate products

This commit is contained in:
Prashant Singh 2019-09-11 07:03:40 +05:30
parent 2c45bddb11
commit 82ae345fdf
1 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,54 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Webkul\Product\Repositories\ProductRepository as Product;
class GenerateProducts extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'bagisto:generate {value}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generates product with random attribute values.';
/**
* ProductRepository instance
*/
protected $product;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(Product $product)
{
parent::__construct();
$this->product = $product;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
if ($this->argument('value') == 'products') {
$this->comment('Under development.');
} else {
$this->line('Sorry, generate option is either invalid or does not exist.');
}
}
}