//PHP 內置 web 服務器
//php -S 0.0.0.0:1024php
//用戶權限
php artisan make:authweb
//進行數據庫遷移(migration)
php artisan migrate數據庫
// Artisan 工具新建 Model 類及其附屬的 Migration 和 Seeder(數據填充)類
php artisan make:model Article服務器
//使用 artisan 生成 Migration
php artisan make:migration create_article_table工具
//修改/database/migrations/2*****_create_article_table
public function up()
{
Schema::create('articles', function(Blueprint $table)
{
$table->increments('id');
$table->string('title');
$table->text('body')->nullable();
$table->integer('user_id');
$table->timestamps();
});
}開發
php artisan migraterem
//Seeder 是咱們接觸到的一個新概念,字面意思爲播種機。Seeder 解決的是咱們在開發 web 應用的時候,
//須要手動向數據庫中填入假數據的繁瑣低效問題。string
php artisan make:seeder ArticleSeederit