Laravel Nova: Datetime with format and pickerFormat combined does not work

I got the fallowing date time field: DateTime ::make(‘foobar’) ->format(‘DD-MM-YYYY HH:mm:ss’) // https://momentjs.com/docs/#/parsing/string-format/ ->pickerFormat(‘d-m-Y H:i:S’) // https://flatpickr.js.org/formatting/ ->rules(‘required’, ‘date_format:Y-m-d H:i:s’) ->firstDayOfWeek(1) Momentjs does not recognise the date. I get a warning after changing the date in console: Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to…

How to properly form an API route using Laravel Resource?(with relationships)

I’m confused on how to create my routings on my backend API program. I’m using this as my basis : https://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/ I wanted a suggestion,opinion or solutions if my routings are correct. example.com/users/1/employees/1 creates [ data : { username : ‘Username1′, email : ’email@example.com’, employeesData : { fullname : ‘John Mcain’, birthDate : ‘1990-01-01’, address…

Adapt my method store () for update () in Laravel 5.6

Here is my method store(). there is a check on the ceiling not to be reached. For information, the code is correct for the method store(). public function store(Request $request) { $request->validate([ ‘date_seance’ => ‘required’, ‘hour_start’ => ‘required’, ‘hour_end’ => ‘required’, ‘fk_student’ => ‘required’ ]); $date_seance = $request->get(‘date_seance’); $hour_start = $request->get(‘hour_start’); $hour_end = $request->get(‘hour_end’); $fk_student…