本文整理匯總了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
}
示例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]);
}
示例3: index
public function index()
{
$user = \Auth::guard('admin')->user();
return view('admin.others.test')->with('user', $user);
}
示例4: logout
public function logout()
{
//ログアウト
\Auth::guard('admin')->logout();
//リダイレクト
return redirect()->to('/admin/admins/login');
}
示例5: logout
public function logout()
{
\Auth::guard('doctors')->logout();
return view('home');
}