Skip to content

Commit e6e42dc

Browse files
committed
updated bootstrap to 5 and jquery
1 parent c2c3099 commit e6e42dc

File tree

13 files changed

+28568
-16273
lines changed

13 files changed

+28568
-16273
lines changed

app/Http/Controllers/API/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public function login(Request $request)
4545
{
4646
$credentials = [
4747
'email' => $request->email,
48-
'password' => $request->password,
48+
'password' => $request->password
4949
];
5050

51-
if (Auth::attempt($credentials)) {
51+
if (Auth::attempt($credentials, true)) {
5252
$success = true;
5353
$message = 'User login successfully';
5454
} else {

app/Models/User.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace App\Models;
44

5+
use Laravel\Sanctum\HasApiTokens;
6+
use Illuminate\Notifications\Notifiable;
57
use Illuminate\Contracts\Auth\MustVerifyEmail;
68
use Illuminate\Database\Eloquent\Factories\HasFactory;
79
use Illuminate\Foundation\Auth\User as Authenticatable;
8-
use Illuminate\Notifications\Notifiable;
910

1011
class User extends Authenticatable
1112
{
12-
use HasFactory, Notifiable;
13+
use HasApiTokens, HasFactory, Notifiable;
1314

1415
/**
1516
* The attributes that are mass assignable.

0 commit comments

Comments
 (0)