public function appendRoute()
    {
        if (!$this->confirm('Do you want to append new route?')) {
            return;
        }

        $contents = $this->laravel['files']->get($path = app_path('Http/routes.php'));
        $contents .= PHP_EOL."Route::group(['middleware' => ['web']], function () {";
        $contents .= PHP_EOL."\tRoute::resource('{$this->getRouteName()}', '{$this->getControllerName()}');";
        $contents .= PHP_EOL."});";

        $this->laravel['files']->put($path, $contents);

        $this->console->info('Route appended successfully.');
    }
public function appendRoute()
    {
        if (!$this->confirm('Do you want to append new route?')) {
            return;
        }

        $contents = $this->laravel['files']->get($path = app_path('Http/routes.php'));
        $contents .= PHP_EOL."Route::group(['middleware' => ['web']], function () {";
        $contents .= PHP_EOL."\tRoute::resource('{$this->getRouteName()}', '{$this->getControllerName()}');";
        $contents .= PHP_EOL."});";

        $this->laravel['files']->put($path, $contents);

        $this->console->info('Route appended successfully.');
    }
public function appendRoute ( ) { if ( ! $ this -> confirm ( 'Do you want to append new route?' ) ) { return ; } $ contents = $ this -> laravel [ 'files' ] -> get ( $ path = app_path ( 'Http/routes.php' ) ) ; $ contents .= PHP_EOL . "Route::group(['middleware' => ['web']], function () {" ; $ contents .= PHP_EOL . "\tRoute::resource('{$this->getRouteName()}', '{$this->getControllerName()}');" ; $ contents .= PHP_EOL . "});" ; $ this -> laravel [ 'files' ] -> put ( $ path , $ contents ) ; $ this -> console -> info ( 'Route appended successfully.' ) ; }
Append new route.
Append new route .