Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id | name | value | type |
- 1 | Test_Array | [somearray] | array |
- 2 | Test_Boolean | someboolean | boolean |
- protected function getCastType($key) {
- if ($key == 'value' && !empty($this->type)) {
- return $this->type;
- } else {
- return parent::getCastType($key);
- }
- }
- $model == (new Model(['type' => $data['type']))->fill($data)->save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement