title: Creating and using Laravel 4 commands
body: <p>EDIT: Figured out where I was going wrong and placed an answer at the end</p>
  
  <p>I'm trying to create a Laravel Command, I can see it's changed considerably from "tasks" in Laravel 3. However I can't seem to get it to run. These are the steps I have taken:</p>
  
  <blockquote>
    <p>php artisan command:make Import</p>
  </blockquote>
  
  <p>Returns</p>
  
  <blockquote>
    <p>Command created successfully</p>
  </blockquote>
  
  <p>The file in the commands directory is then created and I have slightly modified to return "Hello World" like so:</p>
  
  <p>
  
  <pre><code>use Illuminate\Console\Command;
  use Symfony\Component\Console\Input\InputOption;
  use Symfony\Component\Console\Input\InputArgument;
  
  class Import extends Command {
  
      /**
       * The console command name.
       *
       * @var string
       */
      protected $name = 'command:import';
  
      /**
       * 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 void
       */
      public function fire()
      {
          return 'Hello World';
      }
  
      /**
       * Get the console command arguments.
       *
       * @return array
       */
      protected function getArguments()
      {
          return array(
              array('example', InputArgument::REQUIRED, 'An example argument.'),
          );
      }
  
      /**
       * 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>However when I try and run the command like so:</p>
  
  <blockquote>
    <p>php artisan Import</p>
  </blockquote>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>[InvalidArgumentException] Command "Import" is not defined.</p>
  </blockquote>
  
  <p>I have tried it with and without capitals as well as naming it "ImportCommand" since the documentation names its command "FooCommand" but with no luck.</p>
  
  <p>Any help would be most appreciated.</p>