public function exportar() { Excel::create('Usuarios', function ($excel) { $excel->sheet('Usuarios', function ($sheet) { $usuarios = \JLcourier\Entities\User::all(); $sheet->fromArray($usuarios); }); })->export('xls'); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }