files = $files; $this->composer = $composer; } /** * Execute the console command. * * @return void */ public function handle() { $fullPath = $this->createBaseMigration(); $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/database.stub')); $this->info('Migration created successfully!'); $this->composer->dumpAutoloads(); } /** * Create a base migration file for the session. * * @return string */ protected function createBaseMigration() { $name = 'create_sessions_table'; $path = $this->laravel->databasePath().'/migrations'; return $this->laravel['migration.creator']->create($name, $path); } }