- add notes

This commit is contained in:
2023-08-01 23:54:03 +02:00
parent 908b1e4bec
commit 2349008131
8 changed files with 67 additions and 5 deletions

View File

@@ -49,6 +49,7 @@ class CVController extends Controller
'mission' => ($mission = $request->get('mission')) === [''] ? [] : $mission,
'rodo' => ($rodo =$request->get('rodo')) === '' ? null : $rodo,
'position' => $request->get('position'),
'notes' => $request->get('notes'),
]);
return redirect()
->route('admin.cv.store')
@@ -72,6 +73,7 @@ class CVController extends Controller
'mission' => ($mission = $request->get('mission')) === [''] ? [] : $mission,
'rodo' => ($rodo =$request->get('rodo')) === '' ? null : $rodo,
'position' => $request->get('position'),
'notes' => $request->get('notes'),
]);
return redirect()
->back()

View File

@@ -18,6 +18,7 @@ class CVRequest extends FormRequest
'mission' => 'nullable|string',
'rodo' => 'nullable|string',
'position' => 'nullable|string',
'notes' => 'nullable|string',
];
}
}

View File

@@ -21,9 +21,10 @@ class FullCVResource extends JsonResource
'locations' => $this->locations,
'views' => $this->resource->info()->select('id')->get()->count(),
'registeredViews' => $this->views,
'position' => $this->position,
'mission' => explode(PHP_EOL, $this->mission ?? '', 5),
'rodo' => $this->rodo,
'position' => $this->position,
'notes' => $this->notes,
'created' => $this->created_at->format('d-m-Y H:i:s'),
'updated' => $this->updated_at->format('d-m-Y H:i:s'),
];

View File

@@ -19,6 +19,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
* @property string|null $mission
* @property string|null $rodo
* @property string|null $position
* @property string|null $notes
* @property int $views
*/
class CV extends Model