1 | <?php namespace Arcanesoft\Auth\Http\Controllers\Foundation; |
||
15 | class RolesController extends FoundationController |
||
16 | { |
||
17 | /* ------------------------------------------------------------------------------------------------ |
||
18 | | Constructor |
||
19 | | ------------------------------------------------------------------------------------------------ |
||
20 | */ |
||
21 | /** |
||
22 | * Instantiate the controller. |
||
23 | */ |
||
24 | public function __construct() |
||
31 | |||
32 | /* ------------------------------------------------------------------------------------------------ |
||
33 | | Main Functions |
||
34 | | ------------------------------------------------------------------------------------------------ |
||
35 | */ |
||
36 | public function index() |
||
46 | |||
47 | public function create() |
||
55 | |||
56 | public function store(CreateRoleRequest $request, Role $role) |
||
57 | { |
||
58 | $role->fill($request->only('name', 'slug', 'description')); |
||
59 | $role->save(); |
||
60 | $role->permissions()->attach($request->get('permissions')); |
||
61 | |||
62 | $message = 'The new role was successfully created !'; |
||
63 | |||
64 | Log::info($message, $role->toArray()); |
||
65 | |||
66 | return redirect() |
||
67 | ->route('auth::foundation.roles.index') |
||
68 | ->with('success', $message); |
||
69 | } |
||
70 | |||
71 | public function show(Role $role) |
||
81 | |||
82 | public function edit(Role $role) |
||
92 | |||
93 | public function update(UpdateRoleRequest $request, Role $role) |
||
107 | |||
108 | public function delete(Role $role) |
||
132 | } |
||
133 |
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.