【发布时间】:2017-09-28 12:32:34
【问题描述】:
我正在尝试设置 Laravel 应用程序。我确保我使用 brew 在我的系统上安装了 postgis:
$ brew install postgis
Warning: postgis 2.3.2 is already installed
我知道它已经被列为composer.json 中的必需包之一,如下所示:
"phaza/laravel-postgis": "^3.0",
我也可以在我的composer.lock 中找到它。
但是当我运行php artisan migrate 时,我明白了
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Database\Schema\Blueprint::enablePostgis()
我的代码看起来像这样
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
...
$table->enablePostgis();
如果我点击enablePostgis 上的跳转到定义,它会将我带到这里:
vendor/phaza/laravel-postgis/src/Schema/Blueprint.php
不确定发生了什么?
【问题讨论】:
标签: php database symfony postgis