1 | <?php |
||
2 | |||
3 | namespace App\Http\Controllers; |
||
4 | |||
5 | use App\Models\Note; |
||
6 | use Illuminate\Http\Request; |
||
7 | |||
8 | class NotesController extends Controller |
||
9 | { |
||
10 | public function get(Request $request) |
||
11 | { |
||
12 | $notes = Note::where('candidate_id', $request->get('candidate_id'))->with('user')->orderBy('created_at', 'ASC')->get(); |
||
0 ignored issues
–
show
|
|||
13 | |||
14 | return response()->json($notes); |
||
15 | } |
||
16 | |||
17 | public function create(Request $request) |
||
18 | { |
||
19 | $note = new Note(); |
||
20 | $note->candidate_id = $request->candidate_id; |
||
0 ignored issues
–
show
|
|||
21 | $note->body = $request->body; |
||
0 ignored issues
–
show
|
|||
22 | $note->user_id = \Auth::id(); |
||
0 ignored issues
–
show
|
|||
23 | $note->save(); |
||
24 | |||
25 | $note = Note::with('user')->find($note->id); |
||
26 | |||
27 | return response()->json($note, 201, ['Location'=>'/notes/'.$note->id]); |
||
28 | } |
||
29 | } |
||
30 |
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.