/**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('portfolio_projects', function (Blueprint $table) {
         $table->dropForeign('project_to_account');
         $table->dropForeign('project_to_client');
     });
     Module::where('namespace', 'portfolio')->delete();
 }
 protected function system_modules()
 {
     $accountModules = app('Modules\\Account\\AccountManager')->account()->modules;
     $modules = Module::with('translations')->get();
     $modules->each(function ($module) use($accountModules) {
         $module->activated = $accountModules->contains($module->id);
     });
     return $modules;
 }
 /**
  * Reverse the migrations.
  */
 public function down()
 {
     Schema::drop('post_translations', function (Blueprint $table) {
         $table->dropForeign('post_translation_to_post');
     });
     Schema::drop('posts', function (Blueprint $table) {
         $table->dropForeign('post_to_user');
     });
     Module::where('namespace', 'blog')->delete();
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('page_translations', function (Blueprint $table) {
         $table->dropForeign('page_translation_to_page');
     });
     Schema::drop('pages', function (Blueprint $table) {
         $table->dropForeign('page_to_account');
         $table->dropForeign('page_to_parent_page');
     });
     Module::where('namespace', 'pages')->delete();
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('account_team_memberships', function (Blueprint $table) {
         $table->dropForeign('team_membership_to_team');
         $table->dropForeign('team_membership_to_membership');
     });
     Schema::drop('account_teams_translations', function (Blueprint $table) {
         $table->dropForeign('translations_to_teams');
     });
     Schema::drop('account_teams', function (Blueprint $table) {
         $table->dropForeign('teams_to_accounts');
     });
     Module::where('namespace', 'team')->delete();
 }
Beispiel #6
0
 protected function seed($prefix)
 {
     $table = ucfirst($prefix) . 'Seeder';
     if (class_exists($table)) {
         if (isset($this->amounts[$prefix])) {
             $this->call($table, $this->amounts[$prefix]);
         } else {
             $this->call($table);
         }
     }
     $accounts = Account::all();
     $modules = Module::all();
     foreach ($accounts as $account) {
         $account->modules()->sync($modules->lists('id')->toArray());
     }
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('contact_address', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('owner_id', false, true);
         $table->string('owner_type');
         $table->string('firstname');
         $table->string('lastname');
         $table->string('street');
         $table->string('box', 30);
         $table->string('postcode');
         $table->string('city');
         $table->string('latitude');
         $table->string('longitude');
         $table->integer('country_id', false, true);
         $table->foreign('country_id', 'contact_address_to_country')->references('id')->on('country');
         $table->timestamps();
     });
     //install the module itself.
     $module = Module::create(['namespace' => 'contact', 'nl' => ['name' => 'Contact'], 'en' => ['name' => 'Contact'], 'fr' => ['name' => 'Contact'], 'de' => ['name' => 'Contact']]);
     $module->routes()->save(new ModuleRoute(['name' => 'store.contact.index', 'nl' => ['title' => 'contact'], 'en' => ['title' => 'contact'], 'fr' => ['title' => 'contact'], 'de' => ['title' => 'contact']]));
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Module::where('namespace', 'shop')->delete();
 }
 /**
  * Reverse the migrations.
  */
 public function down()
 {
     Module::where('namespace', 'marketing')->delete();
 }