Exemplo n.º 1
0
 public function getEditMerchant()
 {
     $indication = "merchant";
     $disabled = 'disabled';
     $route = route('edit-merchant');
     // User,Bank,Address,Merchant,Brand,Website, and Director
     $userObj = new User();
     if (!Auth::check()) {
         $userModel = $userObj->with(['merchant', 'merchant.bank', 'merchant.address', 'merchant.brand', 'merchant.websites', 'merchant.directors'])->where('id', '=', '1')->get()->first();
         $userModel = $this->reShapeMerchantModel($userModel);
         //return $userModel;
     } else {
         $merchantObj = new Merchant();
         $userModel = $merchantObj->getMerchantRelationsFullMeta();
     }
     $mer_doc = merchantdocument::all();
     $doc = Document::all();
     $isbrand = true;
     return view('user/registerMerchant', compact(['indication', 'route', 'disabled', 'userModel', 'mer_doc', 'doc', 'isbrand']));
 }