- 1. 概要
- 2. 作成
1. 概要
プログラムを記述するファイルを作成します。
2. 作成
プロジェクトディレクトリで、プロジェクトの管理ユーザで。
php artisan make:command program_name
そうすると、下記のファイルが作成されます。
app/Console/Commands/program_name.php
ファイルの中身は、下記のように記述されています。
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class program_name extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:program_name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
//
}
}
実行文は、
|