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