2022-01-17 12:58:24 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Projects;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
|
|
|
|
|
|
class StoreProjects extends FormRequest
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
2022-06-13 15:49:59 +02:00
|
|
|
* @return boolean
|
2022-01-17 12:58:24 +01:00
|
|
|
*/
|
|
|
|
|
public function authorize()
|
|
|
|
|
{
|
|
|
|
|
return Auth::checK();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
// TODO : compléter les rules
|
|
|
|
|
'prod_smtp_config' => 'integer|required',
|
|
|
|
|
'prod_smtp_key' => 'required_if:prod_smtp_config,3'
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|