'required', 'description' => 'nullable', 'image_url' => 'nullable', 'ref_model' => 'required', 'ref_model_params' => 'nullable', ]; /** * Get the referring object * * @param Award|null $award * @param User|null $user * * @return null */ public function getReference(self $award = null, User $user = null) { if (!$this->ref_model) { return; } try { return new $this->ref_model($award, $user); } catch (\Exception $e) { return; } } }