title: Model Constructor In Laravel 5
body: <p>Good Day, I've tried using a constructor for my model and it flashes an error...</p>
  
  <blockquote>
  <pre><code>Type error: Too few arguments to function App\DV::__construct(), 0 passed in
  </code></pre>
    
    <p>E:\Apps\SRAWeb\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasEvents.php
    on line 35 &amp; exactly 2 expected.</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>protected $date;
  
  public function __construct($attributes = array(), Request $request){
      parent::__construct($attributes);
      $this-&gt;date = Carbon::parse($request-&gt;toDate)-&gt;format('Y-m-d');
  }
  </code></pre>
  
  <p>I've tested it and come up with is that if I try to inject <strong>Request</strong> Class to my constructor. The errors flash.. but if I remove the Request class it runs smoothly. Whats the problem here?</p>