代码拉取完成,页面将自动刷新
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class AddAuthors extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('authors')->insert(array(
'name' => 'Kevin Hawk',
'bio' => 'Kevin Hawk is a really greate developer!',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
DB::table('authors')->insert(array(
'name' => 'Sandra',
'bio' => 'Sandra is a beautiful girl!',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
DB::table('authors')->insert(array(
'name' => 'Mark Twain',
'bio' => 'Mark Twain was a prominent American author of the 19th century.',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
DB::table('authors')->insert(array(
'name' => 'Martin',
'bio' => 'Martin is a really greate author!',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
DB::table('authors')->insert(array(
'name' => 'Jane Doe',
'bio' => 'Jane Doe is a really greate author!',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
DB::table('authors')->insert(array(
'name' => 'Bill Bo',
'bio' => 'Bill is lorem ipsum dolor sit amet, consectertur adipiscing elit!',
'created_at' => date("Y-m-d H:i:s"),
'updated_at' => date("Y-m-d H:i:s"),
));
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::table('authors')->where('name', '=', 'Kevin Hawk')->delete();
DB::table('authors')->where('name', '=', 'Sandra')->delete();
DB::table('authors')->where('name', '=', 'Mark Twain')->delete();
DB::table('authors')->where('name', '=', 'Martin')->delete();
DB::table('authors')->where('name', '=', 'Jane Doe')->delete();
DB::table('authors')->where('name', '=', 'Bill Bo')->delete();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。