| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 47 | public function setupUpdateOperation() |
||
| 48 | { |
||
| 49 | $this->crud->addField([ |
||
| 50 | 'name' => 'name', |
||
| 51 | 'label' => 'Name', |
||
| 52 | 'type' => 'text', |
||
| 53 | 'attributes' => [ |
||
| 54 | 'readonly'=>'readonly' |
||
| 55 | ] |
||
| 56 | ]); |
||
| 57 | $this->crud->addField([ |
||
| 58 | 'label' => 'Department', |
||
| 59 | 'type' => 'select2', |
||
| 60 | 'name' => 'department_id', // The db column for the foreign key. |
||
| 61 | 'entity' => 'department', // The method that defines the relationship in your Model. |
||
| 62 | 'attribute' => 'name', // Foreign key attribute that is shown to user. |
||
| 63 | 'model' => 'App\Models\Lookup\Department' // Foreign key model. |
||
| 64 | ]); |
||
| 67 |