laravel user find by id code example Example 1: laravel 6 get user id $id = \Auth::id(); Example 2: laravel create get id $id = $this->create($data)->id;