Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Sep 14, 2018
1 parent eb2fbf1 commit ae83524
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,27 @@ public function fields(Request $request)
}
```

## Allowing only one tag

If the user is only allowed to select one tag for your resource you can call the `single` method.

```php
// in your Nova resource

public function fields(Request $request)
{
return [
// ...

Tags::make('Tags')->single(),

// ...
];
}
```

The field will be rendered as a select form element. It will be populated by the names of the tags already saved.

## Working with tags

For more info on how to work with the saved tags, head over to [the docs of spatie/laravel-tags](https://docs.spatie.be/laravel-tags/).
Expand Down
Binary file modified docs/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ae83524

Please sign in to comment.