Пример #1
0
 public function run()
 {
     DB::table('guarantors')->delete();
     Guarantor::create(['loan_id' => 1, 'guarantor' => 'Bo Gwin']);
     Guarantor::create(['loan_id' => 1, 'guarantor' => 'Sharon Gwin']);
     Guarantor::create(['loan_id' => 2, 'guarantor' => 'Matthew Murdock']);
     Guarantor::create(['loan_id' => 2, 'guarantor' => 'Elektra Natchios']);
 }
Пример #2
0
 public function run()
 {
     DB::table('guarantors')->delete();
     Guarantor::create(['loan_id' => 1, 'guarantor' => 'Bo Gwin', 'location' => 'Rayville, LA', 'phone' => '3186379928', 'email' => '*****@*****.**']);
     Guarantor::create(['loan_id' => 1, 'guarantor' => 'Sharon Gwin', 'location' => 'Rayville, LA', 'phone' => '3186379928', 'email' => '*****@*****.**']);
     Guarantor::create(['loan_id' => 2, 'guarantor' => 'Matthew Murdock', 'location' => 'Boston, MA', 'phone' => '6176379928', 'email' => '*****@*****.**']);
     Guarantor::create(['loan_id' => 2, 'guarantor' => 'Elektra Natchios', 'location' => 'New York, NY', 'phone' => '2126379928', 'email' => '*****@*****.**']);
 }
Пример #3
0
 public function update($id)
 {
     // save updated
     $record = $this->records->find($id);
     if (!$record) {
         Guarantor::create(Input::all());
         return $this->respond($record);
     }
     $record->fill(Input::all())->save();
     return $this->respond($record);
 }