2022-04-01 10:18:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
namespace App\Http\Requests\Bo\Ajax;
|
2022-04-01 10:18:04 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
class GetArticleRequest extends FormRequest
|
2022-04-01 10:18:04 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
2022-06-20 14:57:58 +02:00
|
|
|
public function authorize(): bool
|
2022-04-01 10:18:04 +02:00
|
|
|
{
|
2022-06-20 14:57:58 +02:00
|
|
|
return \auth()->check();
|
2022-04-01 10:18:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
2022-06-20 14:57:58 +02:00
|
|
|
* @return array<string, mixed>
|
2022-04-01 10:18:04 +02:00
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2022-06-20 14:57:58 +02:00
|
|
|
'arcadia_id' => 'required|exists:articles,noArt'
|
2022-04-01 10:18:04 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|