Undefined Variable

Posted 1 year ago by youngbill

C:\xampp\htdocs\laravel-app>php artisan migrate

ErrorException : Undefined variable: message

at C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php:19 15| { 16| Schema::create('posts', function (Blueprint $table) { 17| $table->increments('id'); 18| $table->string('title');

19| $message->string('message'); 20| $table->timestamps(); 21| }); 22| } 23|

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined variable: message", "C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php", [Object(Illuminate\Database\Schema\Blueprint)]) C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php:19

2 CreatePostsTable::{closure}(Object(Illuminate\Database\Schema\Blueprint)) C:\xampp\htdocs\laravel-app\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:164

Please use the argument -v to see more details.

at C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php:19 15| { 16| Schema::create('posts', function (Blueprint $table) { 17| $table->increments('id'); 18| $table->string('title');

19| $message->string('message'); 20| $table->timestamps(); 21| }); 22| } 23|

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined variable: message", "C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php", [Object(Illuminate\Database\Schema\Blueprint)]) C:\xampp\htdocs\laravel-app\database\migrations\2018_07_12_102734_create_posts_table.php:19

2 CreatePostsTable::{closure}(Object(Illuminate\Database\Schema\Blueprint)) C:\xampp\htdocs\laravel-app\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:164

Please use the argument -v to see more details.

Please sign in or create an account to participate in this conversation.