當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Auth::guard方法代碼示例

本文整理匯總了PHP中App\Http\Controllers\Auth::guard方法的典型用法代碼示例。如果您正苦於以下問題:PHP Auth::guard方法的具體用法?PHP Auth::guard怎麽用?PHP Auth::guard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在App\Http\Controllers\Auth的用法示例。


在下文中一共展示了Auth::guard方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: hoja_medica_pdf

 public function hoja_medica_pdf($date)
 {
     $medico = Medico::find(\Auth::guard('doctors')->user()->doctor_id);
     $citas = Cita::where('fecha', '=', $date)->where('medico_id', '=', $medico->id)->get();
     $citas->each(function ($citas) {
         $citas->codigo;
         $citas->medico->especialidad;
         $citas->paciente->tipo;
     });
     $citas = $citas->sortBy('horario')->groupBy('medico_id');
     $mpdf = new mPDF('', 'Legal-L');
     $header = \View('admin.reportes.header')->with('date', $date)->render();
     $mpdf->SetFooter('Generado el: {DATE j-m-Y}| AgendaElectronica | ©' . date('Y') . ' ISSSTE BAJA CALIFORNIA');
     $html = \View('admin.reportes.medicos_reports.show')->with('citas', $citas)->with('date', $date)->render();
     $pdfFilePath = 'Citas del ' . fecha_dmy($date) . '.pdf';
     $mpdf->setAutoTopMargin = 'stretch';
     $mpdf->setAutoBottomMargin = 'stretch';
     $mpdf->setHTMLHeader($header);
     $mpdf->SetDisplayMode('fullpage');
     $mpdf->WriteHTML($html);
     $mpdf->Output($pdfFilePath, "I");
     //D
 }
開發者ID:rikardote,項目名稱:agenda,代碼行數:23,代碼來源:ReportesController.php

示例2: cita_store

 public function cita_store(CitasRequest $request, $date)
 {
     $cita = new Cita($request->all());
     $medico = Medico::find(\Auth::guard('doctors')->user()->doctor_id);
     $cita->fecha = fecha_ymd($request->fecha);
     $cita->capturado_por = 1;
     $cita->folio = getRandomeStr(4);
     $medico = Medico::find(\Auth::guard('doctors')->user()->doctor_id);
     $total_citas = Cita::getTotalCitasCount($medico->id, $cita->fecha);
     if ($total_citas) {
         Toastr::error('Error al asignar Cita, Agenda del dia: ' . fecha_dmy($cita->fecha) . ' llena');
         return redirect()->route('hojas.index', ['date' => $request->date]);
     } else {
         $cita->save();
     }
     //Flash::success('Cita registrada con exito!');
     Toastr::success('Cita Agendada con exito');
     return redirect()->route('hojas.index', ['date' => $request->date]);
 }
開發者ID:rikardote,項目名稱:agenda,代碼行數:19,代碼來源:HojasController.php

示例3: index

 public function index()
 {
     $user = \Auth::guard('admin')->user();
     return view('admin.others.test')->with('user', $user);
 }
開發者ID:eizaburo,項目名稱:tamavel,代碼行數:5,代碼來源:OthersController.php

示例4: logout

 public function logout()
 {
     //ログアウト
     \Auth::guard('admin')->logout();
     //リダイレクト
     return redirect()->to('/admin/admins/login');
 }
開發者ID:eizaburo,項目名稱:tamavel,代碼行數:7,代碼來源:AdminsController.php

示例5: logout

 public function logout()
 {
     \Auth::guard('doctors')->logout();
     return view('home');
 }
開發者ID:rikardote,項目名稱:agenda,代碼行數:5,代碼來源:UserdoctorsController.php


注:本文中的App\Http\Controllers\Auth::guard方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。