1 | <?php |
||
11 | class GroupsController extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * ExampleController constructor. |
||
15 | */ |
||
16 | 22 | public function __construct() |
|
22 | |||
23 | /** |
||
24 | * Display a listing of the resource. |
||
25 | * |
||
26 | * @return \Illuminate\Http\Response |
||
27 | */ |
||
28 | 2 | public function index() |
|
37 | |||
38 | /** |
||
39 | * Store a newly created resource in storage. |
||
40 | * |
||
41 | * @param GroupRequest $request |
||
42 | * @return \Illuminate\Http\Response |
||
43 | */ |
||
44 | 6 | public function store(GroupRequest $request) |
|
51 | |||
52 | /** |
||
53 | * Display the specified resource. |
||
54 | * |
||
55 | * @param int $id |
||
56 | * @return \Illuminate\Http\Response |
||
57 | */ |
||
58 | 6 | public function show($id) |
|
64 | |||
65 | /** |
||
66 | * Update the specified resource in storage. |
||
67 | * |
||
68 | * @param GroupRequest $request |
||
69 | * @param int $id |
||
70 | * @return \Illuminate\Http\Response |
||
71 | */ |
||
72 | 2 | public function update(GroupRequest $request, $id) |
|
73 | { |
||
74 | 2 | $group = Group::findOrFail($id); |
|
75 | 2 | $this->authorize($group); |
|
76 | 2 | $input = $request->all(); |
|
77 | 2 | $group->update($input); |
|
78 | 2 | return $group; |
|
79 | } |
||
80 | |||
81 | /** |
||
82 | * Remove the specified resource from storage. |
||
83 | * |
||
84 | * @param int $id |
||
85 | * @return \Illuminate\Http\Response |
||
86 | */ |
||
87 | 4 | public function destroy($id) |
|
94 | } |
||
95 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.