Optimising product category and category names

This commit is contained in:
Deon George
2022-06-12 11:21:20 +10:00
parent 360c1e46a1
commit cc94426902
36 changed files with 269 additions and 156 deletions

View File

@@ -294,12 +294,12 @@ class ServiceController extends Controller
*/
public function update(Request $request,Service $o)
{
if ($request->post($o->type->type)) {
$o->type->forceFill($request->post($o->type->type))->save();
if ($request->post($o->product->category)) {
$o->type->forceFill($request->post($o->product->category))->save();
}
if ($request->post('start_at'))
$o->date_start = $request->start_at;
$o->start_at = $request->start_at;
$o->save();