/** * @param array $payload * @param int $id * @return Member|null */ public function update(array $payload, $id) { $member = $this->member->find($id); if (!$member) { return null; } $member->fill($payload)->save(); return $member; }
/** * Run the database seeds. * * @return void */ public function run() { Member::create(['apellation' => 'Jem', 'firstname' => 'Jeremuel', 'lastname' => 'Raymundo', 'middlename' => 'Manlapaz', 'gender' => 'M', 'birthdate' => '1988-08-09', 'address' => 'Golden City Subdivision, City of Santa Rosa, Laguna', 'phone_mobile' => '09227430185', 'email' => '*****@*****.**']); }