But its not working
What is not working?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all. I have a rest full api. So I want to validate via DI my request.
I have a request look like this
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class DownloadRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'url' => 'required'
];
}
}
In my controller I have a code look like this
public function store(DownloadRequest $request){
// my logic here
}
But its not working. Also I want to validate my web form request by this DownlaodRequest
. Please help me to solve this problem
Please or to participate in this conversation.