Added images links

This commit is contained in:
2022-02-16 11:30:50 +01:00
parent 1d89f724f9
commit 771a60ef8b
4 changed files with 45 additions and 0 deletions

View File

@@ -29,6 +29,11 @@ class ProjectRequest extends FormRequest
'categories' => 'nullable|string',
'release_date' => 'required|date:Y-m-d',
'update_date' => 'nullable|date:Y-m-d',
'image_small' => 'nullable|string',
'image_medium' => 'nullable|string',
'image_large' => 'nullable|string',
'project_url' => 'nullable|string',
'project_version' => 'nullable|string',
'description' => 'nullable|string',

View File

@@ -69,6 +69,10 @@ class ProjectRepository implements ProjectRepositoryInterface
if (isset($data['author']))
$toSave['author'] = $data['author'];
$toSave['images']['small'] = $data['image_small'] ?? '';
$toSave['images']['medium'] = $data['image_medium'] ?? '';
$toSave['images']['large'] = $data['image_large'] ?? '';
if (isset($data['release_date']))
$toSave['release_date'] = $data['release_date'];