Skip to content

Commit

Permalink
Merge pull request #80 from christmex/patch-2
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rupadana authored Nov 28, 2024
2 parents 063c90e + 0a40979 commit 4e5914c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ In order to allow modifying the query for your model you can implement the `HasA
```php
class User extends Model implements HasAllowedFields, HasAllowedSorts, HasAllowedFilters {
// Which fields can be selected from the database through the query string
public function getAllowedFields(): array
public static function getAllowedFields(): array
{
// Your implementation here
}

// Which fields can be used to sort the results through the query string
public function getAllowedSorts(): array
public static function getAllowedSorts(): array
{
// Your implementation here
}

// Which fields can be used to filter the results through the query string
public function getAllowedFilters(): array
public static function getAllowedFilters(): array
{
// Your implementation here
}
Expand Down

0 comments on commit 4e5914c

Please sign in to comment.