Open aptvaltechtest opened 4 years ago
Can you share what version of laravel are you using and what database?
My laravel version is 6.2 and it's mysql Ver 14.14 and PHP 7.2.24
little more investigation: cloned a fresh 6.2 install, created just the migration and seeder and then followed your install procedure and created a crud
Behaviour is still as described originally. I can delete records, add them but when I show the detail page the form is filled in with a '1' in each field and if I attempt to update a record it updates the record with id=1 and the contents of the fields that I fill in.
EDIT:
I resolved the show issue by removing the or '' from each isset line and it seems to resolve it (I don't know if that is the correct or best thing to do though).
The update issue remains however.
I've populated my table with sample data and I can see the main list of items, I can add and delete items but if I update or show it returns a 1 in each form field.
I've done a var_dump on $company
$company = Company::findOrFail($id);
and it shows the array of the record I'm expecting but pass it to the view and it shows as described.