Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function handle() |
||
19 | { |
||
20 | $viewName = $this->argument('name'); |
||
21 | |||
22 | $fileNameWithPath = resource_path('views' . DIRECTORY_SEPARATOR . str_replace('.', DIRECTORY_SEPARATOR, $viewName) . '.blade.php'); |
||
23 | |||
24 | $path = dirname($fileNameWithPath); |
||
25 | |||
26 | if (!is_dir($path)) { |
||
27 | \File::makeDirectory($path, 0755, true); |
||
28 | } |
||
29 | |||
30 | \File::put($fileNameWithPath, ''); |
||
31 | |||
32 | $this->info('Success'); |
||
33 | } |
||
34 | } |
||
35 |