getRouteKey(); } public function title() { if ($this->title != '') { return $this->title; } if ($this->name != '') { return $this->name; } return 'None'; } public function toArray($request) { return [ 'id' => $this->getRouteKey(), 'title' => $this->title(), 'slug' => $this->slug, 'reporting_to' => $this->reporting_to, 'team_id' => $this->team_id, 'listing_team_id' => $this->listing_team_id, 'deal_team_id' => $this->deal_team_id, 'name' => $this->name, 'email' => $this->email, 'password' => $this->password, 'api_token' => $this->api_token, 'avaya_code' => $this->avaya_code, 'avaya_updated' => $this->avaya_updated, 'avaya_active' => $this->avaya_active, 'remember_token' => $this->remember_token, 'sex' => $this->sex, 'dob' => $this->dob, 'designation' => $this->designation, 'description' => $this->description, 'mobile' => $this->mobile, 'phone' => $this->phone, 'address' => $this->address, 'street' => $this->street, 'city' => $this->city, 'district' => $this->district, 'state' => $this->state, 'country' => $this->country, 'photo' => $this->photo, 'web' => $this->web, 'property_type' => $this->property_type, 'lead_type' => $this->lead_type, 'emirate_id' => $this->emirate_id, 'location_type' => $this->location_type, 'permissions' => $this->permissions, 'status' => $this->status, 'email_verified_at' => $this->email_verified_at, 'division' => $this->division, 'crm_name' => $this->crm_name, 'rera_brn' => $this->rera_brn, 'languages' => $this->languages, 'join_date' => $this->join_date, 'photo_assigned_at' => $this->photo_assigned_at, 'listing' => $this->listing, 'deal' => $this->deal, 'lead' => $this->lead, 'type' => $this->type, 'opportunity' => $this->opportunity, 'lead_pool' => $this->lead_pool, 'lead_pool_count' => $this->lead_pool_count, 'lead_count' => $this->lead_count, 'lead_contact' => $this->lead_contact, 'lead_priority' => $this->lead_priority, 'bank' => $this->bank, 'branch' => $this->branch, 'ifsc_code' => $this->ifsc_code, 'transfer_code' => $this->transfer_code, 'account_number' => $this->account_number, 'call_answer_rate' => $this->call_answer_rate, 'sale_target' => $this->sale_target, 'rent_target' => $this->rent_target, 'commercial_target' => $this->commercial_target, 'agent_type' => $this->agent_type, 'call_target' => $this->call_target, 'listing_target' => $this->listing_target, 'viewing_target' => $this->viewing_target, 'offer_target' => $this->offer_target, 'deal_target' => $this->deal_target, 'hold_counts' => $this->hold_counts, 'location_id' => $this->location_id, 'expiry_at' => $this->expiry_at, 'color' => $this->color, 'timings' => $this->timings, 'user_id' => $this->user_id, 'user_type' => $this->user_type, 'upload_folder' => $this->upload_folder, 'migrated' => $this->migrated, 'leadpool_amount' => $this->leadpool_amount, 'leaderboard' => $this->leaderboard, 'enable_otp' => $this->enable_otp, 'user_roles_h' => $this->user_roles_h, 'created_at' => !is_null($this->created_at) ? $this->created_at->format('Y-m-d H:i:s') : null, 'updated_at' => !is_null($this->updated_at) ? $this->updated_at->format('Y-m-d H:i:s') : null, 'meta' => [ 'exists' => $this->exists(), 'link' => $this->itemLink(), 'upload_url' => $this->getUploadURL(''), 'workflow' => $this->workflows(), 'actions' => $this->actions(), ], ]; } /** * Get additional data that should be returned with the resource array. * * @param \Illuminate\Http\Request $request * @return array */ public function with($request) { return [ 'meta' => [ 'exists' => $this->exists(), 'link' => $this->itemLink(), 'upload_url' => $this->getUploadURL(''), 'workflow' => $this->workflows(), 'actions' => $this->actions(), ], ]; } /** * Get the workflows for the resource. * * @return array */ private function workflows() { $arr = []; return $arr; } /** * Get the actions for the resource. * * @return array */ private function actions() { $arr = []; return $arr; } }