| 1 | <?php |
||
| 10 | trait UpdateHandlerTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Handle update action. |
||
| 14 | * |
||
| 15 | * @param Request $request |
||
| 16 | * @param $id |
||
| 17 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector |
||
| 18 | * @throws PermissionDenied |
||
| 19 | * @throws UnauthorizedException |
||
| 20 | */ |
||
| 21 | 1 | public function handleUpdate(Request $request, $id) |
|
| 40 | |||
| 41 | abstract protected function init(); |
||
| 45 | } |
||
| 46 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: