@@ -74,25 +74,15 @@ public function handle()
74
74
*/
75
75
protected function createDirectories ()
76
76
{
77
- if (! is_dir ($ directory = $ this ->getViewsPath ('layouts ' ))) {
77
+ if (! is_dir ($ directory = $ this ->getViewPath ('layouts ' ))) {
78
78
mkdir ($ directory , 0755 , true );
79
79
}
80
80
81
- if (! is_dir ($ directory = $ this ->getViewsPath ('auth/passwords ' ))) {
81
+ if (! is_dir ($ directory = $ this ->getViewPath ('auth/passwords ' ))) {
82
82
mkdir ($ directory , 0755 , true );
83
83
}
84
84
}
85
85
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
-
96
86
/**
97
87
* Export the authentication views.
98
88
*
@@ -101,7 +91,7 @@ protected function getViewsPath($path)
101
91
protected function exportViews ()
102
92
{
103
93
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 ' )) {
105
95
if (! $ this ->confirm ("The [ {$ value }] view already exists. Do you want to replace it? " )) {
106
96
continue ;
107
97
}
@@ -127,4 +117,16 @@ protected function compileControllerStub()
127
117
file_get_contents (__DIR__ .'/stubs/make/controllers/HomeController.stub ' )
128
118
);
129
119
}
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
+ }
130
132
}
0 commit comments