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