当前位置: 首页>>代码示例>>PHP>>正文


PHP Artisan类代码示例

本文整理汇总了PHP中Artisan的典型用法代码示例。如果您正苦于以下问题:PHP Artisan类的具体用法?PHP Artisan怎么用?PHP Artisan使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Artisan类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: refresh

 public function refresh()
 {
     $rollback = \Artisan::call('migrate:rollback');
     $migrate = \Artisan::call('migrate');
     $seed = \Artisan::call('db:seed');
     dd($seed);
 }
开发者ID:spartanmartin,项目名称:acclaimevents.com,代码行数:7,代码来源:MigrationController.php

示例2: tearDown

 public function tearDown()
 {
     Mockery::close();
     //$this->truncateTablesDb();
     Artisan::call('migrate:reset');
     parent::tearDown();
 }
开发者ID:erickosma,项目名称:acaoparalela,代码行数:7,代码来源:TestCase.php

示例3: setUp

 /**
  * Initial setup function for tests
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     Artisan::call('db:seed');
     $this->setVariables();
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:12,代码来源:DrugControllerTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     DB::beginTransaction();
     $this->repo = (new BaseRepositoryEloquent())->setModel(new User());
 }
开发者ID:sedp-mis,项目名称:base-repository,代码行数:7,代码来源:BaseRepositoryEloquentTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     Artisan::call('db:seed', array('--class' => 'Day007_TodosTableSeeder'));
     $this->test = new Todo();
 }
开发者ID:viniciusferreira,项目名称:daily,代码行数:7,代码来源:TodoTest.php

示例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]);
 }
开发者ID:ryzr,项目名称:bootlegcms,代码行数:34,代码来源:Publish.php

示例7: setUp

 /**
  * Préparation avant les tests
  */
 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     $this->seed();
     Mail::pretend(true);
 }
开发者ID:Anassdev,项目名称:Laravel-Echyzen,代码行数:10,代码来源:TestCase.php

示例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');
 }
开发者ID:dasigr,项目名称:laravelcommerce,代码行数:12,代码来源:ProductRepositoryTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $this->repo = App::make('VocabularyRepository');
     Artisan::call('migrate');
     $this->seed('DatabaseSeeder');
 }
开发者ID:dasigr,项目名称:laravelcommerce,代码行数:7,代码来源:VocabularyRepositoryTest.php

示例11: setUp

 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     $this->seed(__CLASS__ . 'Seeder');
     Route::enableFilters();
 }
开发者ID:yoshiyukiohta,项目名称:gihyo-laravel-book-reservation,代码行数:10,代码来源:ApiReservationTest.php

示例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());
 }
开发者ID:folkevil,项目名称:paperwork,代码行数:7,代码来源:SetupController.php

示例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'));
 }
开发者ID:ricardosncosta,项目名称:nugest-api,代码行数:10,代码来源:MealTest.php

示例14: dump

 public function dump()
 {
     \Artisan::call('db:backup');
     //, ['--option' => 'foo']);
     //return \Redirect::intended();
     return view('abadmin::admin', array('alert_success' => 'Вы создали файл резервной копии вашей Базы Данных!'));
 }
开发者ID:hramose,项目名称:admin,代码行数:7,代码来源:AdminController.php

示例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.");
 }
开发者ID:tisstech-brasil,项目名称:scaffold,代码行数:31,代码来源:MakeScaffoldCommand.php


注:本文中的Artisan类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。