public function commandDetail($id) { $command = Command::find($id); return view('admin/command/commandDetail', ['title' => 'Command n°' . $command->id, 'commandDetails' => $command->commandDetails()->with('product')->get(), 'price' => $command->price]); }