If you are planning to install Chatter on an already existing project, please check the ChatterPreset class and check which of the instalations steps you need to run, really dependes on what you got.
Chatter Branch
Chatter Version
Laravel version
5.x
^5.8
^5.8
6.x
^6
^6
7.x
^7
^7
master
dev-master
^8
Install Laravel 8,
If you are installing Chatter in an existing project skip this step.
Include the package in your project and publish the package views, configs, etc:
Run the chatter:install command and follow the instructions:
$ php artisan chatter:install
If you are installing Chatter in an existing project, include the --plugin option when you call the install command:
$ php artisan chatter:install --plugin
The installation command will take care of all that you need to install the forum: migrations, js components, tailwind, composer packages, node packages, etc.
The app must be connected to a running mysql instance to run the migrations, on a development environment Laravel Sail can be run
Add the CanDiscuss and HasApiTokens trait to your User model. If you have Laravel Passport already installed on your project you probably already have the HasApiTokens trait in your User model:
Chatter installation command already installs Laravel Passport but you need to add the CreateFreshApiToken middleware to your web middleware group in your app/Http/Kernel.php file:
'web' => [
// Other middleware...
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
],
If you are installing Chatter on a fresh Laravel instalation, go straight to step 9
If you're experiencing issues with your chatter installation, refer to Known issues. If you couldn't solve the issue, please submit a new ticket.
Customization
Configuration
When you published the vendor assets you added a new file inside of your config folder which is called config/chatter.php. This file contains a bunch of configuration you can use to configure your forums
Vue components
All the view components used by Chatter are published to your project by the preset instalation. You can make all the changes you need for your project on those.
请发表评论