<?phpuseIlluminate\Database\Schema\Blueprint;useIlluminate\Database\Migrations\Migration;useIlluminate\Support\Facades\Schema;classCreateBlogTableextendsMigration{/**
* Run the migrations.
*
* @returnvoid
*/publicfunctionup(){//Schema::create('blog',function(Blueprint$table){$table->increments('id');$table->timestamp();$table->string('title',200)->nullable()->comment('标题');$table->string('cover',200)->nullable()->comment('封面');$table->string('summary',200)->nullable()->comment('摘要');$table->text('content')->nullable()->comment('内容');});}/**
* Reverse the migrations.
*
* @returnvoid
*/publicfunctiondown(){//}}
但是尝试创建 table 时报错了:
# php56 artisan migrate
PHP Fatal error: Class 'Illuminate\Foundation\Application' not found in /www/wwwroot/modstart.xuchunyang.cn/bootstrap/app.php on line 14
Fatal error: Class 'Illuminate\Foundation\Application' not found in /www/wwwroot/modstart.xuchunyang.cn/bootstrap/app.php on line 14
操作没有错误,初步判断是没有安装好,提示文件 bootstrap/app.php 有报错。
给出的信息不足以判断具体是什么原因,需要登录服务器进一步查看错误信息和错误日志信息。
推荐使用宝塔一键安装包进行安装。
换70试试
@ModStart: 不错