Skip to content

Commit

Permalink
Added custom database table names instructions in readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev authored and cmgmyr committed Feb 25, 2016
1 parent 7cc2928 commit e36deb1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ Add the service provider to `config/app.php` under `providers`:

Publish Assets

php artisan vendor:publish --provider="Cmgmyr\Messenger\MessengerServiceProvider"
php artisan vendor:publish --provider="Cmgmyr\Messenger\MessengerServiceProvider"

Update config file to reference your User Model:

config/messenger.php
config/messenger.php

Create a `users` table if you do not have one already. If you need one, simply use [this example](https://github.com/cmgmyr/laravel-messenger/blob/v2/src/Cmgmyr/Messenger/examples/create_users_table.php) as a starting point, then migrate.

**(Optional)** Define names of database tables in package config file if you don't want to use default ones:

'messages_table' => 'messenger_messages',
'participants_table' => 'messenger_participants',
'threads_table' => 'messenger_threads',

Migrate your database:

php artisan migrate
Expand All @@ -62,7 +68,7 @@ Add the trait to your user model:
use Cmgmyr\Messenger\Traits\Messagable;

class User extends Model {
use Messagable;
use Messagable;
}


Expand Down

0 comments on commit e36deb1

Please sign in to comment.