2022-01-17 12:58:24 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Projects;
|
|
|
|
|
|
2022-09-21 11:17:58 +00:00
|
|
|
class UpdateProjectRequest extends StoreProjectRequest
|
2022-01-17 12:58:24 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
2022-09-21 11:17:58 +00:00
|
|
|
return \array_merge(parent::rules(), [
|
|
|
|
|
// TODO : compléter les rules .
|
2022-01-17 12:58:24 +01:00
|
|
|
'prod_laravel_app_key' => 'required_if:type,3',
|
|
|
|
|
'dev_laravel_app_key' => 'required_if:type,3',
|
|
|
|
|
'prod_smtp_config' => 'integer|required',
|
|
|
|
|
'prod_smtp_key' => 'required_if:prod_smtp_config,3'
|
2022-09-21 11:17:58 +00:00
|
|
|
]);
|
2022-01-17 12:58:24 +01:00
|
|
|
}
|
|
|
|
|
}
|