Skip to content

Commit eb6028b

Browse files
committed
Open common method visibility
1 parent 4d0ba4f commit eb6028b

10 files changed

+486
-486
lines changed

src/Generators/ControllerGenerator.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,6 @@ protected function buildMethods(Controller $controller): string
203203
return trim($methods);
204204
}
205205

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-
219206
private function fullyQualifyModelReference(string $sub_namespace, string $model_name): string
220207
{
221208
// TODO: get model_name from tree.
@@ -231,4 +218,17 @@ private function fullyQualifyModelReference(string $sub_namespace, string $model
231218

232219
return config('blueprint.namespace') . '\\' . ($sub_namespace ? $sub_namespace . '\\' : '') . $model_name;
233220
}
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+
}
234234
}

src/Generators/FactoryGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected function buildDefinition(Model $model): string
190190
return trim($definition);
191191
}
192192

193-
private function fillableColumns(array $columns): array
193+
protected function fillableColumns(array $columns): array
194194
{
195195
if (config('blueprint.fake_nullables')) {
196196
return $columns;

0 commit comments

Comments
 (0)