コード例 #1
0
 /**
  * Create a new migration install command instance.
  *
  * @param  \Illuminate\Database\Migrations\MigrationCreator  $creator
  * @param  \Illuminate\Foundation\Composer  $composer
  * @param  string  $packagePath
  * @return void
  */
 public function __construct(MigrationCreator $creator, Composer $composer, $packagePath)
 {
     parent::__construct();
     $this->creator = $creator;
     $this->composer = $composer;
     $this->packagePath = $packagePath;
 }
コード例 #2
0
 /**
  * Get migration path (either specified by '--path' option or default location).
  *
  * @return string
  */
 protected function getMigrationPath()
 {
     if (!is_null($targetPath = $this->input->getOption('path'))) {
         return $this->laravel->basePath() . '/' . $targetPath;
     }
     return parent::getMigrationPath();
 }
コード例 #3
0
ファイル: MigrateCommand.php プロジェクト: stillat/database
 /**
  * Create a new tenant migrations command instance.
  *
  * @param  \Stillat\Database\Tenant\Migrations\TenantMigrator  $migrator
  * @param  string  $packagePath
  * @return \Stillat\Database\Tenant\Migrations\MigrateCommand
  */
 public function __construct(TenantMigrator $migrator, $packagePath)
 {
     parent::__construct();
     $this->migrator = $migrator;
     $this->packagePath = $packagePath;
     // There is nothing special about the TenantMigrationResolver class, so let's just new up one.
     $this->tenantMigrationResolver = new TenantMigrationResolver();
 }
コード例 #4
0
ファイル: MakeMigration.php プロジェクト: magicians/PeskyCMF
 protected function getFilePath($name, $forSqlFile = false, $forRollbackSqlFile = false)
 {
     $basePath = preg_replace('%[/\\\\]%', DIRECTORY_SEPARATOR, parent::getMigrationPath()) . DIRECTORY_SEPARATOR;
     if ($forSqlFile) {
         $basePath .= $this->sqlSubdir . DIRECTORY_SEPARATOR;
         if ($forRollbackSqlFile) {
             $basePath .= $this->sqlRollbackSubdir . DIRECTORY_SEPARATOR;
         }
     }
     if (!Folder::exist($basePath)) {
         Folder::add($basePath, 0775);
     }
     return $basePath . date('Y_m_d_His') . '_' . $name . ($forSqlFile ? '.sql' : '.php');
 }
コード例 #5
0
ファイル: StatusCommand.php プロジェクト: nix9/laracasts
 /**
  * Create a new migration rollback command instance.
  *
  * @param  \Illuminate\Database\Migrations\Migrator $migrator
  * @return \Illuminate\Database\Console\Migrations\StatusCommand
  */
 public function __construct(Migrator $migrator)
 {
     parent::__construct();
     $this->migrator = $migrator;
 }
コード例 #6
0
 /**
  * Create a new migration install command instance.
  *
  * @param  \Illuminate\Database\Migrations\MigrationCreator  $creator
  * @param  \Illuminate\Foundation\Composer  $composer
  * @return void
  */
 public function __construct(MigrationCreator $creator, Composer $composer)
 {
     parent::__construct();
     $this->creator = $creator;
     $this->composer = $composer;
 }
コード例 #7
0
 /**
  * Create a new migrator instance.
  *
  * @param \Illuminate\Filesystem\Filesystem        $files
  * @param \Illuminate\Database\Migrations\Migrator $migrator
  */
 public function __construct(Filesystem $files, Migrator $migrator)
 {
     parent::__construct();
     $this->migrator = $migrator;
     $this->files = $files;
 }
コード例 #8
0
ファイル: Backup.php プロジェクト: Mrzhanglu/ForoneAdmin
 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct(Filesystem $files)
 {
     parent::__construct();
     $this->files = $files;
 }
コード例 #9
0
ファイル: MigrateCommand.php プロジェクト: kartx22/Otoru-Dice
 /**
  * Create a new migration command instance.
  *
  * @param  \Illuminate\Database\Migrations\Migrator  $migrator
  * @param  string  $packagePath
  * @return void
  */
 public function __construct(Migrator $migrator, $packagePath)
 {
     parent::__construct();
     $this->migrator = $migrator;
     $this->packagePath = $packagePath;
 }
コード例 #10
0
 /**
  * Create a new migration sluggable instance.
  *
  * @param SluggableMigrationCreator $creator
  */
 public function __construct(SluggableMigrationCreator $creator)
 {
     parent::__construct();
     $this->creator = $creator;
 }
コード例 #11
0
ファイル: MigrationCommand.php プロジェクト: microffice/units
 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $app = app();
     $app['view']->addNamespace('units', substr(__DIR__, 0, -8) . 'views');
 }
コード例 #12
0
ファイル: Burrow.php プロジェクト: chaoticwave/grubworm
 /** @inheritdoc */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $this->intro();
     if (empty($_path = $this->option('output-path'))) {
         $_path = 'database';
     }
     try {
         $_path = Disk::path([base_path(), $_path], true);
     } catch (\Exception $_ex) {
         $this->error('Unable to write to output path "' . $_path . '"');
         return false;
     }
     $this->destination = $_path;
     if ('default' == ($this->database = $this->argument('database'))) {
         $this->database = config('database.default');
     }
     return true;
 }