diff --git a/README.md b/README.md index a38c545..3b02979 100644 --- a/README.md +++ b/README.md @@ -409,6 +409,16 @@ class YourEloquentModel extends Model } ``` +### Find models by slug + +For convenience, you can use the alias `findBySlug` to retrieve a model. The query will compare against the field passed to `saveSlugsTo` when defining the `SlugOptions`. + +```php +$model = Article::findBySlug('my-article'); +``` + +`findBySlug` also accepts a second parameter `$columns` just like the default Eloquent `find` method. + ## Changelog