Вот что у меня есть:
Код: Выделить всё
class UpdatePlacesImages extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:update-places-images';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Fetch places data(specially images) from Places API and save it in the goog_data field';
/**
* Execute the console command.
*/
public function handle()
{
/* We are updating google_data field by using two separate functions
1: updatePlacesImages()
Updating ""google_data"" field using ""place_id"" for all places ""Expect Lounges"" because Lounges places
are stored in table name ""lounges"" and DB name ""newairport"" while the remaining all places are
saved in table name ""places"" and DB name ""airport_remote
2: updateLoungesImages()
Updating ""google_data"" field using ""place_id"" only for lounges place
*/
$this->updatePlacesImages();
$this->updateLoungesImages();
}
}
1: я хочу передать параметр places или lounges >.
Пример:
1: php artisan app:update-places-images Places
или
2: мастер PHP app:update-places-images залы ожидания
Подробнее здесь: https://stackoverflow.com/questions/792 ... n-commands
Мобильная версия