Update MasterdetailController.php