This commit is contained in:
Benjamin Takats
2023-01-28 21:48:20 +01:00
parent b9f3f0ba7b
commit 9f153e7630
23 changed files with 441 additions and 19 deletions

View File

@@ -0,0 +1,40 @@
<?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()
{
$meetups = Meetup::query()
->with([
'city',
])
->get();
foreach ($meetups as $meetup) {
dd($meetup->city->name);
}
return Command::SUCCESS;
}
}