Overview

Namespaces

  • Composer
    • Autoload
  • Illuminate
    • Support
      • Contracts
      • Facades
  • Laravella
    • Cart
      • Facades
  • None
  • PHP

Classes

  • CartInstallCommand
  • CartServiceProvider
  • CartUpdateCommand
  • DbGopher
  • MysqlGopher
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php namespace Laravella\Cart;
 2: 
 3: use Illuminate\Console\Command;
 4: use Symfony\Component\Console\Input\InputOption;
 5: use Symfony\Component\Console\Input\InputArgument;
 6: 
 7: class CartInstallCommand extends Command {
 8: 
 9:     /**
10:      * The console command name.
11:      *
12:      * @var string
13:      */
14:     protected $name = 'cart:install';
15: 
16:     /**
17:      * The console command description.
18:      *
19:      * @var string
20:      */
21:     protected $description = 'Install the shopping cart.';
22: 
23:     /**
24:      * Create a new command instance.
25:      *
26:      * @return void
27:      */
28:     public function __construct()
29:     {
30:         parent::__construct();
31:     }
32: 
33:     /**
34:      * Execute the console command.
35:      *
36:      * @return void
37:      */
38:     public function fire()
39:     {
40:                 $this->call('migrate',array('--package'=>'laravella/cart'));
41:         $this->call('db:seed',array('--class'=>'CartDatabaseSeeder'));
42:         $this->info('Cart installation complete.');
43:     }
44: 
45:     /**
46:      * Get the console command arguments.
47:      *
48:      * @return array
49:      */
50:     protected function getArguments()
51:     {
52:         return array(
53:             //array('example', InputArgument::REQUIRED, 'An example argument.'),
54:         );
55:     }
56: 
57:     /**
58:      * Get the console command options.
59:      *
60:      * @return array
61:      */
62:     protected function getOptions()
63:     {
64:         return array(
65:             //array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
66:         );
67:     }
68: 
69: }
cart API documentation generated by ApiGen 2.8.0