@@ -203,19 +203,6 @@ protected function buildMethods(Controller $controller): string
203
203
return trim ($ methods );
204
204
}
205
205
206
- private function determineModel (Controller $ controller , ?string $ reference ): string
207
- {
208
- if (empty ($ reference ) || $ reference === 'id ' ) {
209
- return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly (Str::singular ($ controller ->prefix ())));
210
- }
211
-
212
- if (Str::contains ($ reference , '. ' )) {
213
- return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly (Str::before ($ reference , '. ' )));
214
- }
215
-
216
- return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly ($ reference ));
217
- }
218
-
219
206
private function fullyQualifyModelReference (string $ sub_namespace , string $ model_name ): string
220
207
{
221
208
// TODO: get model_name from tree.
@@ -231,4 +218,17 @@ private function fullyQualifyModelReference(string $sub_namespace, string $model
231
218
232
219
return config ('blueprint.namespace ' ) . '\\' . ($ sub_namespace ? $ sub_namespace . '\\' : '' ) . $ model_name ;
233
220
}
221
+
222
+ private function determineModel (Controller $ controller , ?string $ reference ): string
223
+ {
224
+ if (empty ($ reference ) || $ reference === 'id ' ) {
225
+ return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly (Str::singular ($ controller ->prefix ())));
226
+ }
227
+
228
+ if (Str::contains ($ reference , '. ' )) {
229
+ return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly (Str::before ($ reference , '. ' )));
230
+ }
231
+
232
+ return $ this ->fullyQualifyModelReference ($ controller ->namespace (), Str::studly ($ reference ));
233
+ }
234
234
}
0 commit comments