/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $cc1 = new CommandCenter();
     $cc1->owner = 'Anders';
     $cc1->location = new Point(56.422009, 12.084047);
     $cc1->save();
 }
예제 #2
0
<?php

use App\CommandCenter;
use Phaza\LaravelPostgis\Geometries\Point;
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/demo', function () {
    $cc = CommandCenter::first();
    dd($cc->location);
});
Route::get('/', function () {
    return view('welcome');
});
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/