當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。