Files
einundzwanzig-portal/app/Console/Commands/Map/CreateGeoJsonPolygon.php
2023-02-19 18:05:16 +01:00

44 lines
835 B
PHP

<?php
namespace App\Console\Commands\Map;
use App\Models\Meetup;
use Illuminate\Console\Command;
class CreateGeoJsonPolygon extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'map:polygon';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$meetups = Meetup::query()
->with([
'city',
])
->get();
foreach ($meetups as $meetup) {
dd($meetup->city->name);
}
return Command::SUCCESS;
}
}