Hello @rizki,
The first steps are always difficult :)
The issue is from this line.
return view('admin.inputCargo',['users' => $users1],['packing' => $packing],['city' => $listCity ],['users' => $users]);
The view function suspect the data to be in the second parameter and optional in the third. The second part of the issue is that you use users name twice (the key of the array is the variable name in the blade)
You can do it on this way (I split the values on multiple lines for the readability). The array keys are the variable names in your blade.
return view('admin.inputCargo', [
'users1' => $users1,
'packing' => $packing,
'city' => $listCity,
'users' => $users
]);
Another way is to use the with function, that accept a key and value.
return view('admin.inputCargo')
->with('users1', $users1)
->with('packing', $packing)
->with('city', $listCity)
->with('users', $users);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community