| @@ 47-58 (lines=12) @@ | ||
| 44 | * |
|
| 45 | * @return |
|
| 46 | */ |
|
| 47 | private function doCreate() |
|
| 48 | { |
|
| 49 | if (is_callable(array('self', 'save'))) { |
|
| 50 | $this->save(); |
|
| 51 | ||
| 52 | event(new ModelCreate($this)); |
|
| 53 | ||
| 54 | return; |
|
| 55 | } |
|
| 56 | ||
| 57 | throw new WriteableException('For a Model to be Creatable the ModelAdmin must have the Save method implemented using the ModelWriting trait', 1); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Method fired after the Create action is complete. |
|
| @@ 51-62 (lines=12) @@ | ||
| 48 | * |
|
| 49 | * @return |
|
| 50 | */ |
|
| 51 | private function doEdit() |
|
| 52 | { |
|
| 53 | if (is_callable(array('self', 'save'))) { |
|
| 54 | $this->save(); |
|
| 55 | ||
| 56 | event(new ModelEdit($this)); |
|
| 57 | ||
| 58 | return; |
|
| 59 | } |
|
| 60 | ||
| 61 | throw new WriteableException('For a Model to be Editable the ModelAdmin must have the Save method implemented using the ModelWriting trait', 1); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Method fired after the Edit action is complete. |
|