Exemple #1
0
 /**
  * Start the installation.
  * 
  * @access public
  *
  * @return mixed Value.
  */
 public function install()
 {
     $this->_spacer();
     $this->_header('Beginning Installation...');
     $this->_subheader('Creating the DB migration.');
     $this->create_migration();
     $this->_spacer();
     Laravel\CLI\Command::run(array('migrate'));
     $this->_spacer();
     $this->_subheader('Publishing Slender assets');
     $this->_spacer();
     Laravel\CLI\Command::run(array('bundle:publish'));
     $this->_spacer();
     $this->_subheader('Installation Complete!');
 }
Exemple #2
0
 public function minimal()
 {
     Laravel\CLI\Command::run(array('migrate:reset'));
     Laravel\CLI\Command::run(array('migrate'));
     Laravel\CLI\Command::run(array('seed:minimal'));
 }
Exemple #3
0
<?php

Route::get('(:bundle)/(:all?)', function ($params = null) {
    $well = function ($header, $code) {
        return View::make('artisan::well', array('header' => $header, 'code' => $code));
    };
    if (empty($params)) {
        $examples = array(URL::current() . '/bundle+task.method/param', URL::current() . '/bundle+task', URL::current() . '/task.method', URL::current() . '/migrate', URL::current() . '/migrate.reset');
        return $well('Try something like this', implode('<br />', $examples));
    }
    $args = str_replace(array('+', '.'), array('::', ':'), explode('/', $params));
    $ret = $well('Equivalent command', 'php artisan ' . implode(' ', $args));
    ob_start();
    try {
        require path('sys') . 'cli/dependencies' . EXT;
        Laravel\CLI\Command::run($args);
    } catch (Exception $ex) {
        echo $ex->getMessage();
    }
    $output = str_replace(PHP_EOL, '<br />', ob_get_contents());
    ob_end_clean();
    $ret .= $well('Output', $output);
    return $ret;
});
Exemple #4
0
 public function setup()
 {
     Laravel\Request::set_env('test');
     Laravel\CLI\Command::run(array('sync:minimal'));
 }