...
This commit is contained in:
parent
1e22d28754
commit
6b926d3afe
126 changed files with 128562 additions and 104297 deletions
|
|
@ -0,0 +1,21 @@
|
|||
https://www.youtube.com/watch?v=H1KiXEsmsCs&list=PLT9miexWCpPW6Z_OXNv2d78cqCrZaPrVG&index=34
|
||||
|
||||
Routes.php:
|
||||
```php
|
||||
//Get
|
||||
$routes->get("logout", "AuthController::logout", ["filter" => "apiauth"]);
|
||||
```
|
||||
|
||||
AuthController.php
|
||||
```php
|
||||
public function logout() {
|
||||
auth()->logout();
|
||||
auth()->user()->revokeAllAccessTokens();
|
||||
|
||||
return $this->respondCreated([
|
||||
"status" => true,
|
||||
"message" => "User logged out successfully",
|
||||
"data" => []
|
||||
]);
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue