| 1 | <?php |
||
| 8 | class DownloadCommand extends Command |
||
| 9 | { |
||
| 10 | protected $signature = 'laradeck:download |
||
| 11 | {url} |
||
| 12 | {--name= : Save file with name} |
||
| 13 | {--path= : Path relative storage/app}'; |
||
| 14 | |||
| 15 | protected $description = 'Download file'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $url; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $file; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $path; |
||
| 31 | |||
| 32 | public function __construct() |
||
| 36 | |||
| 37 | public function handle() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | protected function getFileNameWithPath(): string |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | protected function getFilePath(): string |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | protected function getFileName(): string |
||
| 75 | } |
||
| 76 |