@@ -10,10 +10,10 @@ class LoginController extends Controller
1010{
1111 public function show (Request $ request )
1212 {
13- $ isProd = \ app ()->environment ('production ' );
13+ $ isProd = app ()->environment ('production ' );
1414
15- return \ inertia ('Login/Show ' , [
16- 'email ' => ! $ isProd ? \ config ('app.seed.emails.super ' , '' ) : '' ,
15+ return inertia ('Login/Show ' , [
16+ 'email ' => ! $ isProd ? config ('app.seed.emails.super ' , '' ) : '' ,
1717 'password ' => ! $ isProd ? '12345 ' : '' ,
1818 'remember ' => ! $ isProd ? true : false ,
1919 'redirect ' => $ request ->query ('redirect ' , '' ),
@@ -22,19 +22,19 @@ public function show(Request $request)
2222
2323 public function store (LoginStoreRequest $ request )
2424 {
25- \ throw_if (
26- ! \ auth ()->attempt ($ request ->only ('email ' , 'password ' ), $ request ->only ('remember ' )),
25+ throw_if (
26+ ! auth ()-> guard ()->attempt ($ request ->only ('email ' , 'password ' ), $ request ->only ('remember ' )),
2727 ValidationException::withMessages ([
28- 'email ' => \ __ ('auth.failed ' ),
28+ 'email ' => __ ('auth.failed ' ),
2929 ])
3030 );
3131
3232 $ request ->session ()->regenerate ();
3333
3434 if ($ request ->validated ('redirect ' )) {
35- return \ redirect ()->to ($ request ->validated ('redirect ' ));
35+ return redirect ()->to ($ request ->validated ('redirect ' ));
3636 }
3737
38- return \ redirect ()->route ('home ' );
38+ return redirect ()->route ('home ' );
3939 }
4040}
0 commit comments