$data=['user_id'] = Auth::user()->id;

PHP
use Auth;
$user_id = Auth::user()->id;
$userId = Auth::id();
Source

Also in PHP: