Edit File: ServiceMakeCommand.php
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Console\GeneratorCommand; class ServiceMakeCommand extends GeneratorCommand { /** * The name and signature of the console command. * * @var string */ protected $signature = 'make:service {name}'; /** * The console command description. * * @var string */ protected $description = 'Create a new service class'; /** * Execute the console command. * * @return int */ public function handle() { parent::handle(); } /** * Get the stub file for the generator. * * @return string */ protected function getStub() { return $this->resolveStubPath('/stubs/service.stub'); } /** * Resolve the fully-qualified path to the stub. * * @param string $stub * @return string */ protected function resolveStubPath($stub) { return is_file($customPath = $this->laravel->basePath(trim($stub, '/'))) ? $customPath : __DIR__ . $stub; } /** * Get the destination class path. * * @param string $name * @return string */ protected function getPath($name) { if (!is_dir(app_path('Services'))) mkdir(app_path('Services')); return app_path('Services/' . $name . 'Service.php'); } /** * Parse the class name and format according to the root namespace. * * @param string $name * @return string */ protected function qualifyClass($name) { return $name; } }
Back to File Manager