本文整理汇总了PHP中Artisan::call方法的典型用法代码示例。如果您正苦于以下问题:PHP Artisan::call方法的具体用法?PHP Artisan::call怎么用?PHP Artisan::call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Artisan
的用法示例。
在下文中一共展示了Artisan::call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: refresh
public function refresh()
{
$rollback = \Artisan::call('migrate:rollback');
$migrate = \Artisan::call('migrate');
$seed = \Artisan::call('db:seed');
dd($seed);
}
示例2: tearDown
public function tearDown()
{
Mockery::close();
//$this->truncateTablesDb();
Artisan::call('migrate:reset');
parent::tearDown();
}
示例3: setUp
/**
* Initial setup function for tests
*
* @return void
*/
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
Artisan::call('db:seed');
$this->setVariables();
}
示例4: setUp
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
DB::beginTransaction();
$this->repo = (new BaseRepositoryEloquent())->setModel(new User());
}
示例5: setUp
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
Artisan::call('db:seed', array('--class' => 'Day007_TodosTableSeeder'));
$this->test = new Todo();
}
示例6: fire
/**
* Execute the console command.
*
* @return mixed
*/
public function fire()
{
//echo $this->argument('example');
//echo $this->option('example');
$app_name = $this->option('app_name');
$app_id = $this->option('app_id');
if ($app_name) {
$plugins = \Plugin::whereHas('applications', function ($q) use($app_name) {
$q->where('name', $app_name);
})->get();
} else {
if ($app_id) {
$plugins = \Plugin::whereHas('applications', function ($q) use($app_id) {
$q->where('id', $app_id);
})->get();
} else {
$plugins = \Plugin::get();
}
}
echo "\n";
foreach ($plugins as $plugin) {
//Register appliation service providers
\App::register($plugin->service_provider);
echo "Publishing for " . $plugin->name . "\n";
}
//we now need to re asset publish?
//TODO: do we really want to force this 100% of the time?
\Artisan::call('vendor:publish', ['--force' => 1]);
}
示例7: setUp
/**
* Préparation avant les tests
*/
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
$this->seed();
Mail::pretend(true);
}
示例8: setUp
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
Product::boot();
Description::boot();
SubProduct::boot();
Image::boot();
Feature::boot();
Variation::boot();
KeywordProfile::boot();
Add::boot();
//es client and index repo for testing integration with index
$this->es_client = $this->app->make('Elasticsearch\\Client');
$this->index_repo = $this->app->make('Giftertipster\\Repository\\ProductsIndex\\Product\\ESProductsIndexProductRepository');
$this->config = \Config::get('index.index_products_type_product');
$this->index = $this->config['setup']['index'];
$this->type = $this->config['setup']['type'];
//seed user id 1 & 2 for tests
Factory::create('Giftertipster\\Entity\\Eloquent\\User', ['permissions' => []]);
Factory::create('Giftertipster\\Entity\\Eloquent\\User', ['permissions' => []]);
//seed add type id 1 for tests
Factory::create('Giftertipster\\Entity\\Eloquent\\AddType');
$this->createStubCategories();
//mock prod suite validator (validates suite attributes keys)
//may be overriden in individual tests
$suite_validator = \Mockery::mock('Giftertipster\\Service\\Validate\\ProductSuite\\ProductSuiteValidationInterface');
$suite_validator->shouldReceive('validateSuiteAttributesForCreate')->andReturn(true);
$suite_validator->shouldReceive('validateSuiteAttributesForUpdate')->andReturn(true);
$this->app->instance('Giftertipster\\Service\\Validate\\ProductSuite\\ProductSuiteValidationInterface', $suite_validator);
}
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:31,代码来源:EloquentProductSuiteRepositoryTestBase.php
示例9: setUp
/**
* Setup the test environment.
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->repo = App::make('ProductRepository');
Artisan::call('migrate');
Artisan::call('db:seed');
}
示例10: setUp
public function setUp()
{
parent::setUp();
$this->repo = App::make('VocabularyRepository');
Artisan::call('migrate');
$this->seed('DatabaseSeeder');
}
示例11: setUp
/**
* setUp
*/
public function setUp()
{
parent::setUp();
Artisan::call('migrate');
$this->seed(__CLASS__ . 'Seeder');
Route::enableFilters();
}
示例12: update
public function update()
{
define('STDIN', fopen("php://stdin", "r"));
Artisan::call("paperwork:update", ['--quiet' => true]);
Cache::forget('paperwork.commitInfo');
return PaperworkHelpers::apiResponse(PaperworkHelpers::STATUS_SUCCESS, array());
}
示例13: setupDB
/**
* Sets up DB data to test
*/
public function setupDB()
{
Artisan::call('migrate');
Artisan::call('db:seed', array('--class' => 'UsersTableSeeder'));
Artisan::call('db:seed', array('--class' => 'DishesTableSeeder'));
Artisan::call('db:seed', array('--class' => 'MealsTableSeeder'));
}
示例14: dump
public function dump()
{
\Artisan::call('db:backup');
//, ['--option' => 'foo']);
//return \Redirect::intended();
return view('abadmin::admin', array('alert_success' => 'Вы создали файл резервной копии вашей Базы Данных!'));
}
示例15: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$arguments = $this->argument('attribute:type');
$entity = $this->argument('entity');
$attributes = $this->validateAndSetNames($entity, $arguments);
$this->info("Generating Schema ...");
$this->generateSchema($attributes);
$this->info("Generating Controller ...");
$this->generateController();
$this->info("Generating Model ...");
$this->generateModel($attributes);
$this->info("Generating Views ...");
$this->generateViews($attributes);
$this->info("Updating Route ...");
$route = "\nRoute::resource('" . $this->models . "', '" . $this->Models . "Controller');";
file_put_contents('app/Http/routes.php', $route, FILE_APPEND | LOCK_EX);
$this->info("Running Migration ...");
\Artisan::call('migrate');
$this->info("Seeding Data ...");
$this->seedData($attributes);
$this->info("Running Auto load ...");
exec('composer dump-autoload');
$this->info("Running Seeds ...");
exec('php artisan db:seed --class=' . $this->Models . 'TableSeeder');
$this->info("Scaffolding Complete.");
}