Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mstaack/91fd45bd7ebc755eb3a1f789aca74f2b to your computer and use it in GitHub Desktop.
Save mstaack/91fd45bd7ebc755eb3a1f789aca74f2b to your computer and use it in GitHub Desktop.
<?php
use App\Models\Mongo\Venue;
use Illuminate\Database\Migrations\Migration;
class VenueIndiciesMigration extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Venue::truncate();
Schema::connection('mongodb')->create('venues', function ($collection) {
$collection->geospatial('location', '2dsphere');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment