/** * Run the database seeds. * * @return void */ public function run() { $faker = Faker::create('ja_JP'); for ($i = 0; $i < 10; $i++) { Hoge::create(['body' => $faker->name()]); } }
public function postCreate(CreateRequest $request) { Hoge::create($request->all()); return view('sample/hoge/list', ['list' => Hoge::get()]); }