Fixed syntax error in french translations.
Removed 'required' on image validation which was breaking tests
{
$this->checkPermission('image-create-all');
$this->validate($request, [
- 'file' => 'required|image'
+ 'file' => 'is_image'
]);
if (!$this->imageRepo->isValidType($type)) {
return response($e->getMessage(), 500);
}
+
return response()->json($image);
}
public function boot()
{
// Custom validation methods
- Validator::extend('image', function ($attribute, $value, $parameters, $validator) {
+ Validator::extend('is_image', function ($attribute, $value, $parameters, $validator) {
$imageMimes = ['image/png', 'image/bmp', 'image/gif', 'image/jpeg', 'image/jpg', 'image/tiff', 'image/webp'];
return in_array($value->getMimeType(), $imageMimes);
});
'search_created_before' => 'Créé avant',
'search_created_after' => 'Créé après',
'search_set_date' => 'Choisir la date',
- 'search_update' => 'Actualiser la recherche'
+ 'search_update' => 'Actualiser la recherche',
/**
* Books