你知道 Faker [https://github.com/fzaninotto/Faker] 嗎?
我知道我知道!!
打 LOL 的那個
Faker 是 PHP 產生假資料的 library
他的功能非常強大,幾乎可以應付你所有的需求,不管是文字、數字、圖片、人名只要你想得到的都可以產生出來,那麼就來看看 Laravel 怎麼產生假資料吧。
資料庫結構
在開始之前,先讓我們來產生一張 Articles 這張表來當作範例。
php artisan make:migration create_articles_table
Schema::create('articles', function (Blueprint $table) {
$table->increments('