Server IP : 162.213.251.212 / Your IP : 3.15.205.161 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/allssztx/public_html/easybuyer/app/Http/Controllers/ |
Upload File : |
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Session; use Hash; use App\Models\User; class AdminController extends Controller { // // public function index() // { // return view('auth.login'); // } // public function postLoginAdmin(Request $request) // { // $request->validate([ // 'email' => 'required', // 'password' => 'required' // ]); // $credentials = $request->except(['_token']); // $user = User::where('email',$request->email)->first(); // print_r($user); // if (auth()->attempt($credentials)) { // if(Auth::user()->type=='admin'){ // return redirect("dashboard")->withSuccess('Oppes! You have entered invalid credentials'); // } // }else{ // session()->flash('message', 'Invalid credentials'); // return redirect("admin/login")->withSuccess('Oppes! You have entered invalid credentials'); // } // } }