示例#1
0
 /**
  * Profile index view
  *
  *@return void
  */
 function getIndex()
 {
     $id = Session::get('vendor_id');
     $vendor = ProfileModel::getProfile($id);
     $vendorType = ProfileModel::getVendorType($id);
     $passport_imgExists = ProfileModel::imageExists($id, 'passport_img');
     $id_imgExists = ProfileModel::imageExists($id, 'id_img');
     $driving_imgExists = ProfileModel::imageExists($id, 'driving_img');
     $bill_imgExists = ProfileModel::imageExists($id, 'bill_img');
     $with = [];
     $passport_imgExists ? $with['passport_img'] = Helper::getImage($id, 'passport_img.jpg') : ($with['passport_img'] = '');
     $id_imgExists ? $with['id_img'] = Helper::getImage($id, 'id_img.jpg') : ($with['id_img'] = '');
     $passport_imgExists ? $with['driving_img'] = Helper::getImage($id, 'driving_img.jpg') : ($with['driving_img'] = '');
     $passport_imgExists ? $with['bill_img'] = Helper::getImage($id, 'bill_img.jpg') : ($with['bill_img'] = '');
     $with['vendor'] = $vendor;
     $with['vendorType'] = $vendorType;
     return View::make('profile.index')->with('vendor', $vendor)->with($with);
 }