Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 1409921

Browse files
committed
👽 updated auth code
1 parent 07fa616 commit 1409921

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

app/controllers/Controller.php

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

33
namespace App\Controllers;
44

5-
// Leaf Auth is a package which makes user authentication simple
6-
use Leaf\Auth;
7-
85
/**
96
* This is the base controller for your Leaf MVC Project.
107
* You can initialize packages or define methods here to use
@@ -20,12 +17,12 @@ public function __construct()
2017
// requestData() or request() to get request data or initialise it yourself
2118

2219
// autoConnect uses the .env variables to quickly connect to db
23-
Auth::autoConnect();
20+
auth()->autoConnect();
2421

2522
// You can configure auth to get additional customizations
26-
// This can be done here with the Auth::config method or
23+
// This can be done here with the auth()->config method or
2724
// simply in the config/auth.php file
28-
Auth::config(AuthConfig());
25+
auth()->config(AuthConfig());
2926

3027
// You can refer to https://leafphp.dev/modules/auth for auth docs
3128
}

0 commit comments

Comments
 (0)