diff --git a/README.md b/README.md index 734fc10..fc482e0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,106 @@ # Laravel Helpers +[![Lint PR](https://github.com/achyutkneupane/laravel-helpers/actions/workflows/prlint.yml/badge.svg)](https://github.com/achyutkneupane/laravel-helpers/actions/workflows/prlint.yml) +[![Bump version](https://github.com/achyutkneupane/laravel-helpers/actions/workflows/tagrelease.yml/badge.svg)](https://github.com/achyutkneupane/laravel-helpers/actions/workflows/tagrelease.yml) +[![Latest Stable Version](http://poser.pugx.org/achyutn/laravel-helpers/v)](https://packagist.org/packages/achyutn/laravel-helpers) +[![Total Downloads](http://poser.pugx.org/achyutn/laravel-helpers/downloads)](https://packagist.org/packages/achyutn/laravel-helpers) +[![Dependents](http://poser.pugx.org/achyutn/laravel-helpers/dependents)](https://packagist.org/packages/achyutn/laravel-helpers) + +## Installation + +You can install the package via composer: + +```bash +composer require achyutn/laravel-helpers +``` + +## Usage + +### Traits + +You can use following traits for your models: + +#### `HasTheSlug` + +This trait is used to generate slug for your model. It uses [cviebrock/eloquent-sluggable](https://github.com/cviebrock/eloquent-sluggable) package. + +`Note: ` You must have `slug` column in your table and the source column for the slug should be `title`. + +```php +