proximitySearch added

This commit is contained in:
Benjamin Takats
2022-12-01 22:29:53 +01:00
parent 8e8bd81afe
commit 2ccd54dc02
15 changed files with 262 additions and 79 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::table('cities', function (Blueprint $table) {
$table->double('longitude');
$table->double('latitude');
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('cities', function (Blueprint $table) {
//
});
}
};

View File

@@ -61,14 +61,20 @@ class DatabaseSeeder extends Seeder
City::create([
'country_id' => 1,
'name' => 'Füssen',
'latitude' => 47.57143,
'longitude' => 10.70171,
]);
City::create([
'country_id' => 2,
'name' => 'Wien',
'latitude' => 48.20835,
'longitude' => 16.37250,
]);
City::create([
'country_id' => 3,
'name' => 'Zürich',
'latitude' => 47.41330,
'longitude' => 8.65639,
]);
Venue::create([
'city_id' => 1,