database migration - Laravel 5.1.11 migrate with php artisan does not work for me -
i using laravel 5.1.11 when try run php artisan migrate command faced following error message:
****[symfony\component\debug\exception\fatalerrorexception] syntax error, unexpected 'public' (t_public)**** with database connection configuration in database.php , .env quite fine because php artisan migrate:install works fine.
this migration code:
**<?php use illuminate\database\schema\blueprint; use illuminate\database\migrations\migration; class createflightstables extends migration { /** * run migrations. * // schema::create('flights', function (blueprint $table) { * @return void */ public function up() { // schema::create('flights', function (blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('airline'); $table->timestamps(); } /** * reverse migrations. * * @return void */ public function down() { // schema::drop('flights'); } }**
try replacing function up() with
schema::create('flights', function (blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('airline'); $table->timestamps(); }); think missing bracket , semicolon @ end
Comments
Post a Comment