/** * The attributes that are mass assignable. * * @var array */ public function index() { $id = DB::table('users')->insertGetId( ['email' => 'john@example.com','name' => 'john'] ); }