Download the PHP package andreaselia/laravel-firefly without Composer
On this page you can find all versions of the php package andreaselia/laravel-firefly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andreaselia/laravel-firefly
More information about andreaselia/laravel-firefly
Files in andreaselia/laravel-firefly
Package laravel-firefly
Short Description A simple forum package for Laravel.
License MIT
Informations about the package laravel-firefly
Laravel Firefly
Firefly is a simple forum package for Laravel, created for ease of use and expansion.
The package ships with a frontend included, but by publishing the packages assets you have the flexibility to customize the available templates and make them match your current applications templates, should you so desire.
Installation
Install the package:
Publish package files (config, migrations, assets and views):
Run the migrations:
Add the FireflyUser trait to your User model:
Optional Features
Watchers
You can enable users to "watch" discussions by adding / updating the flag in the config:
This will allow watchers to be notified when new posts are made in the discussion
WYSIWYG Editor
The WYSIWYG Editor uses the Quill library, and the docs can be found here.
You can enable a WYSIWYG editor by adding/updating the flag in the config like so:
The snow theme and basic editing controls are provided out of the box in the config, but these can be modified to fit your needs.
Correct Posts
You can enable the ability to mark a post as "correct" indicating that it answers the question or is a promoted post. Correct posts are promoted to the top, directly under the initial post.
Note: If you are enabling this on an existing install, you should make sure to run database migrations and then run the posts:set-initial-flag
command, to bring your database up to date. This also introduces two new policies, mark
and unmark
.
Reactions
Enabling reactions allows users to react to posts with emojis. This work similarly to Discord, Slack and other popluar messaging systems. Clicking a reaction will add it to the post. Clicking the same one again will remove it.
If you are running an older version or older charset in mySQL or using another database that does not handle native emojis correctly, enabling the convert
flag will convert the emojis to and from html entities so they are stored correctly on the back-end. If you are usingutf8mb4
charsets or newer, this is not needed.
Note: If you are enabling this on an existing install, you should make sure to run database migrations. This also introduces a new policy react
.
Policies
By default, Firefly policies are very permissive. In order to customize the permissions for your own application, please use your AuthServiceProvider
file to overwrite the policies by following the steps below.
- Create your policy files via
php artisan make:policy MyGroupPolicy
-
In the generated class, extend the base Firefly policy:
- Implement whatever policy you wish (use the policies in
vendor/andreaselia/laravel-firefly/src/Policies
for reference) - Update the policies array in the
app/Providers/AuthServiceProvider.php
file like so:
Learn more about Laravel policies here.
Contributing
You're more than welcome to submit a pull request, or if you're not feeling up to it - create an issue so someone else can pick it up.
All versions of laravel-firefly with dependencies
illuminate/config Version ^8.0|^9.0|^10.0
illuminate/contracts Version ^8.0|^9.0|^10.0
illuminate/support Version ^8.0|^9.0|^10.0
illuminate/routing Version ^8.0|^9.0|^10.0
spatie/laravel-sluggable Version ^3.4.2