Technical notes about OctoberCMS a Laravel CMS. Notes are written by inetis team, a Swiss webagency

Do you manage multiple websites? Try our OctoberCMS monitoring solution

<- Back

Get current user

Posted on by

Get current user in frontend and backend of OctoberCMS

For the frontend use Auth

use Auth;
$user = Auth::getUser();
echo $user->id;

for the BackendAuth use

use BackendAuth;
$user = BackendAuth::getUser();
echo $user->id;