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

<- 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;