title: laravel 4.2 artisan command:name with arguments
body: <p>I have created an artisan command called sendUnreadNotifications this triggers the system to send users emails if they have unread notifications. Eventually this will be run via a cron job, and a user can either have hourly updates or daily updates.</p>
  
  <p>For this reason I am wanting to send an argument with my command, something like this, </p>
  
  <pre><code>php artisan command:name sendUnreadNotifications H --env=local
  </code></pre>
  
  <p>However running this, I get the following error, </p>
  
  <blockquote>
    <p>[RuntimeException]<br>
      Too many arguments.</p>
  </blockquote>
  
  <p>My code, looks like this, </p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Console\Command;
  use Symfony\Component\Console\Input\InputOption;
  use Symfony\Component\Console\Input\InputArgument;
  
  class sendUnreadNotifications extends Command {
  
  /**
   * The console command name.
   *
   * @var string
   */
  protected $name = 'command:name';
  
  /**
   * The console command description.
   *
   * @var string
   */
  protected $description = 'Command description.';
  
  /**
   * Create a new command instance.
   *
   * @return void
   */
  public function __construct()
  {
      parent::__construct();
  }
  
  /**
   * Execute the console command.
   *
   * @return mixed
   */
  public function fire()
  {
      $request = Request::create('api/notifications/send/unread', 'GET', array($this-&gt;getArguments()));
      Route::dispatch($request)-&gt;getContent();
  }
  
  /**
   * Get the console command arguments.
   *
   * @return array
   */
  protected function getArguments()
  {
      return array(
          array('frequency', InputArgument::OPTIONAL, 'How often should the email be sent', 'H'),
      );
  }
  
  /**
   * Get the console command options.
   *
   * @return array
   */
  protected function getOptions()
  {
      return array(
          array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
      );
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I cannot see why I would be getting the too many arguments exception?</p>