belongsTo('FireflyIII\User'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function rules() { return $this->hasMany('FireflyIII\Models\Rule'); } /** * @param RuleGroup $value * * @return Rule */ public static function routeBinder(RuleGroup $value) { if (Auth::check()) { if ($value->user_id == Auth::user()->id) { return $value; } } throw new NotFoundHttpException; } }