1 | <?php |
||||
2 | |||||
3 | namespace TaskManager\Http\Controllers; |
||||
4 | |||||
5 | use TaskManager\Services\ApiService; |
||||
6 | |||||
7 | class UserController extends Controller |
||||
8 | { |
||||
9 | protected $user; |
||||
10 | protected $api; |
||||
11 | public function __construct(ApiService $api) |
||||
12 | { |
||||
13 | $this->middleware('auth'); |
||||
14 | $this->api = $api; |
||||
15 | } |
||||
16 | /** |
||||
17 | * Display a listing of the resource. |
||||
18 | * |
||||
19 | * @return \Illuminate\Http\Response |
||||
20 | */ |
||||
21 | public function index() |
||||
22 | { |
||||
23 | $api = $this->api->getApi(); |
||||
24 | return view('profile', compact('api')); |
||||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||||
25 | } |
||||
26 | |||||
27 | /** |
||||
28 | * Remove the specified resource from storage. |
||||
29 | * @return \Illuminate\Http\Response |
||||
30 | * @internal param User $user |
||||
31 | */ |
||||
32 | public function destroy() |
||||
33 | { |
||||
34 | auth()->logout(); |
||||
0 ignored issues
–
show
The method
logout() does not exist on Illuminate\Contracts\Auth\Factory .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
35 | return redirect()->home(); |
||||
0 ignored issues
–
show
|
|||||
36 | } |
||||
37 | } |
||||
38 |