belongsTo(\App\Models\Core\App\Application::class); } public function scopeActive($query) { return $query->where('active', 1); } public function scopeByApplication($query, $application_id) { return $query->where('application_id', $application_id); } public function scopeBySlug($query, $slug) { return $query->where('slug', $slug); } }