Gitlab@Informatics

Skip to content
Snippets Groups Projects

proof tranfer update

5 files
+ 55
23
Compare changes
  • Side-by-side
  • Inline

Files

@@ -22,13 +22,13 @@ public function login(Request $request)
$id_card = $request->input('id_card');
$pass = $request->input('pass');
//print_r($request->input());
// $user = DB::table('users')
// ->where('email', $id_card)->where('password', $pass)->first();
$user = collect(DB::select('SELECT * FROM users WHERE email = ? and password = ?' , [$id_card, $pass]))->first();
$user = DB::table('users')
->where('email', $id_card)->where('password', $pass)->first();
//$user = collect(DB::select('SELECT * FROM users WHERE email = ? and password = ?' , [$id_card, $pass]))->first();
// สำหรับ Insert
// $user = DB::insert('insert into users (name,email, password) values(?,?,?)',
// [$id_card, $id_card, $pass]);
//$user = DB::insert('insert into users (name,email, password) values(?,?,?)',
// [$id_card, $id_card, $pass]);
//USER_TYPE decision
if($user->password == '1'){
Loading