src/Services/BackpackCrudModelService.php 1 location
|
@@ 34-41 (lines=8) @@
|
| 31 |
|
return ucfirst($entity); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
private function fillFillableAttributeInGeneratedModelFromSchema() |
| 35 |
|
{ |
| 36 |
|
$modelFile = end($this->command->filesToBeOpened); |
| 37 |
|
|
| 38 |
|
$model = $this->filesystem->get($modelFile); |
| 39 |
|
$model = str_replace('__fillable__', $this->getFillableFromSchema(), $model); |
| 40 |
|
$this->filesystem->put($modelFile, $model); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* @return string |
src/Services/BackpackCrudRequestService.php 1 location
|
@@ 37-44 (lines=8) @@
|
| 34 |
|
return ucfirst($entity); |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
private function fillRulesInGeneratedRequest(): void |
| 38 |
|
{ |
| 39 |
|
$requestFile = end($this->command->filesToBeOpened); |
| 40 |
|
|
| 41 |
|
$request = $this->filesystem->get($requestFile); |
| 42 |
|
$request = str_replace('__rules__', $this->getRulesAsString(), $request); |
| 43 |
|
$this->filesystem->put($requestFile, $request); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
private function setRulesFromSchema(): void |
| 47 |
|
{ |