Skip to content

Commit

Permalink
fix #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravitano committed Jun 9, 2015
1 parent a09fc6a commit 38d3dbc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/Pingpong/Admin/Console/MigrationCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php namespace Pingpong\Admin\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class MigrationCommand extends Command
{

/**
* The console command name.
*
* @var string
*/
protected $name = 'admin:migration';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Copy the migration file to the application.';

/**
* Execute the console command.
*
* @return mixed
*/
public function fire()
{
$path = realpath(__DIR__ . '/../../../../src/migrations/');

$this->laravel['files']->copyDirectory(
$path,
$this->laravel['path.database'] . '/migrations/'
);

$this->info("Migrations published successfully.");
}
}
1 change: 1 addition & 0 deletions src/Pingpong/Admin/Providers/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ConsoleServiceProvider extends ServiceProvider
'Seed',
'Refresh',
'Install',
'Migration',
'CreateUser',
];

Expand Down

0 comments on commit 38d3dbc

Please sign in to comment.