Work on incomes & expanse
This commit is contained in:
32
app/Console/Commands/page.php
Normal file
32
app/Console/Commands/page.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class page extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'page:new {name}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Create Inertia page folder with .vue and .scss files';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
shell_exec('mkdir '.getcwd().'\resources\js\Pages\\'.$this->argument('name'));
|
||||
shell_exec('echo. > '.getcwd().'\resources\js\Pages\\'.$this->argument('name').'\\'.strtolower($this->argument('name')).'.vue');
|
||||
shell_exec('echo. > '.getcwd().'\resources\js\Pages\\'.$this->argument('name').'\\'.strtolower($this->argument('name')).'.scss');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user