Download the PHP package skyraptor/chatter without Composer
On this page you can find all versions of the php package skyraptor/chatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package chatter
Chatter - A Laravel Forum package
Installation
Quick Note: If this is a new project, make sure to install the default user authentication provided with Laravel. php artisan make:auth
-
Include the package in your project
-
Publish the Vendor Assets files by running:
-
Now that we have published a few new files to our application we need to reload them with the following command:
-
Run Your migrations:
Quick tip: Make sure that you've created a database and added your database credentials in your
.env
file. -
Lastly, run the seed files to seed your database with a little data:
-
Inside of your master.blade.php file include a header and footer yield. Inside the head of your master or app.blade.php add the following:
Then, right above the
</body>
tag of your master file add the following:
Now, visit your site.com/forums and you should see your new forum in front of you!
Upgrading
Make sure that your composer.json file is requiring the latest version of chatter:
Then you'll run:
Next, you may want to re-publish the chatter assets, chatter config, and the chatter migrations by running the following:
Next to make sure you have the latest database schema run:
And you'll be up-to-date with the latest version :)
Customization
CUSTOM CSS
If you want to add additional style changes you can simply add another stylesheet at the end of your @stack('css')
statement in the head of your master file. In order to only load this file when a user is accessing your forums you can include your stylesheet in the packages template files or wrap it in the following if
statement:
In addition to that you can also import the SCSS from the package directly into your own build.
SEO FRIENDLY PAGE TITLES
Since the forum uses your master layout file, you will need to include the necessary code in order to display an SEO friendly title for your page. The following code will need to be added to the <head>
of your master file:
OVERRIDING VIEWS
In order to override Chatter's built in views, simply create a chatter
folder in your vendor
views folder, i.e. ROOT/resources/views/vendor/chatter
. Then simply drop in the Chatter view files you would like to override.
Laravel Events for the forum
This package provides a number of events allowing you to respond to user actions as they happen:
Event | Available properties | Description |
---|---|---|
ChatterBeforeNewDiscussion |
This event is fired before a discussion is validated and created | |
ChatterAfterNewDiscussion |
Discussion $discussion , Post $post |
This event is fired after a discussion has been validated and created |
ChatterBeforeNewResponse |
Discussion $discussion |
This event is fired before a response is validated and created |
ChatterAfterNewResponse |
Discussion $discussion , Post $post |
This event is fired after a response is validated and created |
ChatterCategorySaved |
Category $category |
This event is fired after a Category has been updated or created |
Listening for Events
To register your listeners for these events, follow the Laravel documentation for registering events and listeners.
For example, to register a listener for the "before new discussion" event, add the following to your EventServiceProvider
:
where App\Listeners\HandleNewDiscussion
is a class in your application which handles the event when it's fired.
You can access the object that triggered the event in your listener with
and
All versions of chatter with dependencies
illuminate/routing Version ^6.0|^7.0|^8.0
illuminate/http Version ^6.0|^7.0|^8.0
illuminate/bus Version ^6.0|^7.0|^8.0
illuminate/mail Version ^6.0|^7.0|^8.0
illuminate/queue Version ^6.0|^7.0|^8.0
illuminate/cache Version 6.0|^7.0|^8.0
graham-campbell/markdown Version ^13.1
doctrine/dbal Version ^2.6|^3.0