From e36deb18e33a37c3d30bbc158b6cc1cadc5d6cd6 Mon Sep 17 00:00:00 2001 From: a-komarev Date: Sun, 14 Feb 2016 14:19:51 +0300 Subject: [PATCH] Added custom database table names instructions in readme. --- readme.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index ea1497a..f41c556 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -62,7 +68,7 @@ Add the trait to your user model: use Cmgmyr\Messenger\Traits\Messagable; class User extends Model { - use Messagable; + use Messagable; }