Skip to content

Commit

Permalink
Updated readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
drobee committed Jul 21, 2019
1 parent fb790ac commit 5b6220c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to `nova-sluggable` will be documented in this file

## 1.1.3 - 2019-07-21

- Vue component matches TextFields's functionality
- Fixes an issue occured when Slug field was used withouth any option (#6)

## 1.1.2 - 2019-05-06

- Option to set triggering event
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,22 @@ Add a new `SluggableText` and a `Slug` field to your Nova Resource:
use Drobee\NovaSluggable\SluggableText;
use Drobee\NovaSluggable\Slug;

SluggableText::make('Title');
Slug::make('Slug');
class User extends Resource
{
// ...

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

SluggableText::make('Title'),
Slug::make('Slug'),

// ...
];
}
}
```

When the user types a string in the `SluggableText` field the value is being sent the API to generate the slug and and then it sets the `Slug` field's value to the that. The slug is updated on every `key up` event, but it can be tied to `blur` event on the title field.
Expand Down

0 comments on commit 5b6220c

Please sign in to comment.