File: /mnt/data/ghayatcom/ghayatcom-api/app/Http/Requests/BlogIdRequest.php
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;
use App\Library\CustomFailedValidation;
class BlogIdRequest extends CustomFailedValidation
{
/**
* 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 [
'blog_id' => 'required|exists:blogs,id',
];
}
}