コード例 #1
0
 public function run()
 {
     DB::table('agents')->delete();
     $collection = [['loan_id' => 1, 'agency' => 'ARM', 'agent' => 'James Bond', 'city_state' => 'Rayville, LA', 'phone' => '8003216789', 'email' => '*****@*****.**'], ['loan_id' => 2, 'agency' => 'ARM', 'agent' => 'James Bond', 'city_state' => 'Rayville, LA', 'phone' => '8003216789', 'email' => '*****@*****.**'], ['loan_id' => 2, 'agency' => 'Farm State', 'agent' => 'Jason Bourne', 'city_state' => 'Monroe, LA', 'phone' => '8005551212', 'email' => '*****@*****.**']];
     foreach ($collection as $record) {
         Agent::create($record);
     }
 }
コード例 #2
0
 public function run()
 {
     DB::table('agents')->delete();
     $collection = [['agency_id' => 1, 'agent' => 'James Bond', 'agent_phone' => '8003216789', 'agent_email' => '*****@*****.**'], ['agency_id' => 2, 'agent' => 'Katniss Everdeen', 'agent_phone' => '8001239876', 'agent_email' => '*****@*****.**'], ['agency_id' => 2, 'agent' => 'Peeta Mallark', 'agent_phone' => '8001239878', 'agent_email' => '*****@*****.**'], ['agency_id' => 2, 'agent' => 'Bilbo Baggins', 'agent_phone' => '7001239876', 'agent_email' => '*****@*****.**'], ['agency_id' => 2, 'agent' => 'Frodo Baggins', 'agent_phone' => '7001239878', 'agent_email' => '*****@*****.**'], ['agency_id' => 2, 'agent' => 'Samwise Gangee', 'agent_phone' => '7001239877', 'agent_email' => '*****@*****.**']];
     foreach ($collection as $record) {
         Agent::create($record);
     }
 }
コード例 #3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $agents = ['Bùi Mỹ Vân', 'Bùi Thanh Hà'];
     $emails = ['*****@*****.**', '*****@*****.**'];
     $mobiles = ['0932622017', '01654477039'];
     $thumnails = ['/frontend/images1/Agents/BuiMyVan.png', '/frontend/images1/Agents/BuiThanhHa.png'];
     foreach ($agents as $key => $value) {
         $project_type = Agent::create(['name' => $agents[$key], 'email' => $emails[$key], 'mobile' => $mobiles[$key], 'thumnail' => $thumnails[$key], 'priority' => $key, 'active' => 1, 'created_by' => 'vankhoe', 'updated_by' => 'vankhoe']);
     }
 }
コード例 #4
0
 public function store(Request $request)
 {
     $this->validate($request, ['bio' => 'required|min:25']);
     $user = Auth::user();
     if ($user->agent) {
         return Redirect::to('/dashboard')->with('fail_message', 'You already have an active post.');
     }
     Agent::create(['bio' => $request->get('bio'), 'user_id' => $user->id]);
     return Redirect::to('/dashboard')->with('success_message', 'Posted.');
 }
コード例 #5
0
 public function store(Request $request)
 {
     $keys = 'id,name,address,phone,factory_ids,brand_ids';
     $data = $this->autoValidate($request, 'agent.store', $keys);
     $factory_ids = array_pull($data, 'factory_ids');
     $brand_ids = array_pull($data, 'brand_ids');
     $agent = Agent::create($data);
     $agent->factories()->sync($factory_ids);
     $agent->brands()->sync($brand_ids);
     return $this->success('', url('admin/agent'));
 }
コード例 #6
0
 public function update($id)
 {
     // save updated
     $record = $this->records->find($id);
     if (!$record) {
         Agent::create(Input::all());
         return $this->respond($record);
     }
     $record->fill(Input::all())->save();
     return $this->respond($record);
 }
コード例 #7
0
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('agents')->truncate();
        $agents = [['name' => 'Jonathan Jacobs', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => 'Jonathan Jacobs has been a licensed agent in Las Vegas since 2005 and a resident since 1995. Specializing in selling and acquiring residential single family homes for his clients, he has sold hundreds of properties in the Las Vegas valley. Mr. Jacobs has been involved in all aspects of the single family investment process, facilitating construction, leasing and property management services, selling and acquiring for investor clients and developers. Jonathan is an expert in Marketing and negotiation of homes in Las Vegas, where he lives and works. He was recently named a top 40 under 40 agent in Las Vegas by GLVAR and a top 250 Hispanic agent out of more than 50,000 agents in the Nation by NAHREP. Jonathan is fluent in both English and Spanish.'], ['name' => 'William Jacobs', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => 'William has been involved in the Las Vegas Real Estate market for over a decade. Prior to becoming licensed, William managed acquisitions, construction, marketing, and leasing for countless properties across the Las Vegas Valley. An vast amount of Mr. Jacobs time is spent on helping out our communities and those who serve them. As a testament to that, he has helped develop and manage programs, such as the Helping our Heroes program for the Las Vegas Police Deparment and the Fireproof program for the Fire Deparment. William is an expert is residential real estate, and is always just a phone call away.'], ['name' => 'Nicole Davis', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => 'Nicole began her career in real estate in 2011 where she started as the receptionist of Simply Vegas. Her ever-expanding role with the company quickly evolved in to becoming the Office Manager, to where she performs a wide variety of tasks including transaction coordination and file management. Before working in real estate she was an administrative assistant for a structural engineering firm, also assisting in project coordination. This background has helped her be meticulous in organization and dedicated to providing an extremely high standard of customer service.'], ['name' => 'Mark Doppe', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => ''], ['name' => 'Kelly', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => ''], ['name' => 'Vasily', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '', 'description' => ''], ['name' => 'Washington Gonzalez', 'email' => '*****@*****.**', 'title' => 'Real Estate Agent', 'phone' => '602-791-1707', 'description' => 'Washington has been in the real estate industry for more than 10 years. Originally from Mexico City, Washington is bilingual and bi-cultural, speaking both Spanish and English fluently, as well as understanding both the Hispanic and Anglo cultures.

				His focus is on his clients preferences and objectives. Their complete satisfaction is a constant goal by delivering exceptional customer service. Known as having a connect to people personality, Washington easily communicates and interacts with clients who encompass a wide range of ages, races and backgrounds.

				Washington has experience representing buyers, sellers, Bankruptcy Trustees, and has performed bilingual acquisition and disposition services for the Community Noise Reduction Program (CNRP), with the City of Phoenix. Washington also has experience with property management for distressed properties.

				Washington holds a Bachelor of Business Administration in Marketing and International Business from Loyola University New Orleans.']];
        foreach ($agents as $agent) {
            \App\Agent::create($agent);
        }
    }
コード例 #8
0
ファイル: AgentAudit.php プロジェクト: unionbt/hanpaimall
 public function doAudit()
 {
     if ($this->audited) {
         return false;
     }
     $factory = Factory::find($this->fid);
     if (empty($factory)) {
         return false;
     }
     $user = (new User())->get($this->username) ?: (new User())->add(['username' => $this->username, 'password' => substr($this->idcard, -6), 'realname' => $this->realname, 'idcard' => $this->idcard, 'phone' => $this->username], Role::AGENT);
     $agent = Agent::find($user->getKey()) ?: Agent::create(['id' => $user->getKey(), 'name' => $this->name, 'phone' => $this->phone, 'address' => $this->address]);
     $user->roles()->sync([Role::where('name', Role::AGENT)->firstOrFail()->getKey()], false);
     $factory->agents()->sync([$agent->getKey()], false);
     $agent->brands()->sync($this->brand_ids, false);
     $this->audited = true;
     $this->save();
     return true;
 }
コード例 #9
0
 public function run()
 {
     DB::table('agents')->delete();
     Agent::create(['email' => '*****@*****.**', 'first_name' => 'Kalyan', 'last_name' => 'Dey', 'password' => '123456']);
 }