for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers;
use App\Http\Requests\GetATreatmentStoreRequest;
use App\Services\NotificationService;
use Illuminate\Http\Request;
class GetATreatmentController extends Controller
{
private NotificationService $notificationService;
public function __construct(
NotificationService $notificationService
) {
$this->notificationService = $notificationService;
}
// Show Contact Form
public function create(Request $request)
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function create(/** @scrutinizer ignore-unused */ Request $request)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return view('forms.getATreatment');
// Store Contact Form data
public function store(GetATreatmentStoreRequest $request)
//dd($request->all());
// Store data in database
//Contact::create($request->all());
$this->notificationService->sendEmailGetATreatment($request->all(), 1);
return back()->with('success', 'Thank you for your treatment request, I will contact you soon.');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.