Skip to content

Commit

Permalink
merged conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Jad Joubran committed Aug 13, 2015
2 parents d4c0305 + 1f68c38 commit d45bbac
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions app/Console/Commands/AngularFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Illuminate\Console\Command;
use File;

class AngularFeature extends Command{

class AngularFeature extends Command
{
/**
* The name and signature of the console command.
* @var string
Expand All @@ -23,21 +23,23 @@ class AngularFeature extends Command{
* Create a new command instance.
* @return void
*/
public function __construct(){
public function __construct()
{
parent::__construct();
}

/**
* Execute the console command.
* @return mixed
*/
public function handle(){
public function handle()
{
$name = $this->argument('name');
$studly_name = studly_case($name);

$html = file_get_contents(__DIR__ . '/Stubs/AngularFeature/feature.html.stub');
$js = file_get_contents(__DIR__ . '/Stubs/AngularFeature/feature.js.stub');
$less = file_get_contents(__DIR__ . '/Stubs/AngularFeature/feature.less.stub');
$html = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.html.stub');
$js = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.js.stub');
$less = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.less.stub');

$html = str_replace('{{StudlyName}}', $studly_name, $html);
$js = str_replace('{{StudlyName}}', $studly_name, $js);
Expand All @@ -53,13 +55,13 @@ public function handle(){
File::makeDirectory($folder, 0775, true);

//create view (.html)
File::put($folder . '/' . $name . '.html', $html);
File::put($folder.'/'.$name.'.html', $html);

//create controller (.js)
File::put($folder . '/' . $name . '.js', $js);
File::put($folder.'/'.$name.'.js', $js);

//create less file (.less)
\File::put($folder . '/' . $name . '.less', $less);
File::put($folder.'/'.$name.'.less', $less);

$this->info('Feature created successfully.');
}
Expand Down

0 comments on commit d45bbac

Please sign in to comment.