Issues (404)

Branch: dev

app/Http/Controllers/ReferencesController.php (4 issues)

1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Support\Facades\Lang;
6
use Illuminate\Http\Request;
7
use App\Http\Controllers\Controller;
8
use App\Models\Applicant;
9
10
class ReferencesController extends Controller
11
{
12
13
    /**
14
     * Show the form for editing the logged-in applicant's references
15
     *
16
     * @param  \Illuminate\Http\Request $request Incoming request object.
17
     * @return \Illuminate\Http\Response
18
     */
19
    public function editAuthenticated(Request $request)
20
    {
21
        $applicant = $request->user()->applicant;
22 1
        return redirect(route('profile.references.edit', $applicant));
0 ignored issues
show
The function redirect was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        return /** @scrutinizer ignore-call */ redirect(route('profile.references.edit', $applicant));
Loading history...
The function route was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        return redirect(/** @scrutinizer ignore-call */ route('profile.references.edit', $applicant));
Loading history...
23
    }
24 1
25 1
    /**
26
     * Show the form for editing the applicant's references
27
     *
28
     * @param  \Illuminate\Http\Request $request   Incoming request object.
29
     * @param  \App\Models\Applicant    $applicant Incoming applicant object.
30
     * @return \Illuminate\Http\Response
31
     */
32
    public function edit(Request $request, Applicant $applicant)
33
    {
34
        $custom_breadcrumbs = [
35 1
            'home' => route('home'),
0 ignored issues
show
The function route was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
            'home' => /** @scrutinizer ignore-call */ route('home'),
Loading history...
36
            'profile' => '',
37 1
        ];
38 1
39
        $applicant->load([
40
            'references.projects',
41
            'skill_declarations.skill',
42 1
        ]);
43 1
44 1
        return view('applicant/profile_04_references', [
0 ignored issues
show
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

44
        return /** @scrutinizer ignore-call */ view('applicant/profile_04_references', [
Loading history...
45
            'applicant' => $applicant,
46
            'profile' => Lang::get('applicant/profile_references'),
47
            'custom_breadcrumbs' => $custom_breadcrumbs,
48
        ]);
49
    }
50
}
51