Skip to content

Commit

Permalink
Updated readme & publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Jul 22, 2020
1 parent 0f6ad67 commit da38b3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ Install the package:
$ composer require rennokki/rating
```

Publish the config file & migration files:
Publish the config:

```bash
$ php artisan vendor:publish
$ php artisan vendor:publish --provider="Rennokki\Rating\RatingServiceProvider" --tag="config"
```

Migrate the database:
Publish the migrations:

```bash
$ php artisan migrate
$ php artisan vendor:publish --provider="Rennokki\Rating\RatingServiceProvider" --tag="migrations"
```

## Preparing the model

To allow a model to rate other models, it should use the `CanRate` trait and implement the `Rater` contract.

```php
Expand Down Expand Up @@ -72,7 +74,8 @@ use Rennokki\Rating\Contracts\Rating;
class User extends Model implements Rating
{
use Rate;
...

//
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/RatingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function boot()

$this->publishes([
__DIR__.'/../database/migrations/2018_07_14_183253_ratings.php' => database_path('migrations/2018_07_14_183253_ratings.php'),
], 'migration');
], 'migrations');
}

/**
Expand Down

0 comments on commit da38b3a

Please sign in to comment.