Skip to content

Commit e78cf02

Browse files
committed
formatting
1 parent 3bdf92c commit e78cf02

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

Diff for: src/Illuminate/Auth/Console/AuthMakeCommand.php

+15-13
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,15 @@ public function handle()
7474
*/
7575
protected function createDirectories()
7676
{
77-
if (! is_dir($directory = $this->getViewsPath('layouts'))) {
77+
if (! is_dir($directory = $this->getViewPath('layouts'))) {
7878
mkdir($directory, 0755, true);
7979
}
8080

81-
if (! is_dir($directory = $this->getViewsPath('auth/passwords'))) {
81+
if (! is_dir($directory = $this->getViewPath('auth/passwords'))) {
8282
mkdir($directory, 0755, true);
8383
}
8484
}
8585

86-
/**
87-
* Get full path relative to the app's configured view path.
88-
*
89-
* @return string
90-
*/
91-
protected function getViewsPath($path)
92-
{
93-
return implode(DIRECTORY_SEPARATOR, [config('view.paths')[0] ?? resource_path('views'), $path]);
94-
}
95-
9686
/**
9787
* Export the authentication views.
9888
*
@@ -101,7 +91,7 @@ protected function getViewsPath($path)
10191
protected function exportViews()
10292
{
10393
foreach ($this->views as $key => $value) {
104-
if (file_exists($view = $this->getViewsPath($value)) && ! $this->option('force')) {
94+
if (file_exists($view = $this->getViewPath($value)) && ! $this->option('force')) {
10595
if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
10696
continue;
10797
}
@@ -127,4 +117,16 @@ protected function compileControllerStub()
127117
file_get_contents(__DIR__.'/stubs/make/controllers/HomeController.stub')
128118
);
129119
}
120+
121+
/**
122+
* Get full view path relative to the app's configured view path.
123+
*
124+
* @return string
125+
*/
126+
protected function getViewPath($path)
127+
{
128+
return implode(DIRECTORY_SEPARATOR, [
129+
config('view.paths')[0] ?? resource_path('views'), $path
130+
]);
131+
}
130132
}

0 commit comments

Comments
 (0)