how to log in controller laravel code example
Example 1: get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Example 2: laravel logger
use Monolog\Logger;
$orderLog = new Logger('order');
$orderLog->pushHandler(new StreamHandler(storage_path('logs/mylogs.log')), Logger::INFO);
$orderLog->info("Order id: ${orderId}");