Advertisement
asliabir

AdminController.php

Apr 8th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Http\Controllers;
  4.  
  5. use Illuminate\Http\Request;
  6. use DB;
  7.  
  8. class AdminController extends Controller
  9. {
  10.     public function index(){
  11.         return view('admin_login');
  12.     }
  13.     public function show_dashboard(){
  14.         return view('admin.dashboard');
  15.     }
  16.  
  17.     public function dashboard(Request $request){
  18.         $admin_email = $request->admin_email;
  19.         $admin_password = md5($request->admin_password);
  20.         $user = DB::table('tbl_admin')->where('admin_email', $admin_email)->first();
  21. //        $user = DB::table('tbl_admin')->where([
  22. //          ['admin_email', '=', $admin_email],
  23. //          ['admin_password', '=', $admin_password]
  24. //      ])->first();
  25. //        $user = DB::table('tbl_admin')->where('admin_email','abiruzzaman.molla@gmail.com')->where('admin_password', '81dc9bdb52d04dc20036dbd8313ed055')->first();
  26.  
  27. //        echo $admin_email .'</br>';
  28. //        echo $admin_password .'</br>';
  29. //        echo $user->admin_name .'</br>';
  30. //        echo $user->admin_phone .'</br>';
  31.         var_dump($user->email);
  32.         exit();
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement