title: laravel - 'Auth' is not working in cron schedule
body: <p>I have created a cron job in the 'commands' files. and I want to get the id of the user using <strong>Auth::user()-&gt;id</strong> but I am getting the error. Where am I missing?</p>
  <p><strong>My error:</strong></p>
  <p>Trying to get property 'id' of non-object</p>
  <p><strong>My controller</strong></p>
  <pre><code>use Illuminate\Support\Facades\Auth;
  
  protected $signature = 'orders:minute';
  
  public function handle()
      {
          $id = Auth::user()-&gt;id;
      }
  </code></pre>
  <p><strong>Kernel.php</strong></p>
  <pre><code>protected function schedule(Schedule $schedule)
  {
      $schedule-&gt;command('orders:minute')
      -&gt;everyMinute();
  }
  </code></pre>