{"id":16668332,"url":"https://github.com/andreaselia/laravel-firefly","last_synced_at":"2025-03-21T17:32:33.943Z","repository":{"id":33278792,"uuid":"149909240","full_name":"andreaselia/laravel-firefly","owner":"andreaselia","description":"Firefly is a simple forum package for Laravel, created for ease of use and expansion.","archived":false,"fork":false,"pushed_at":"2023-03-28T19:13:44.000Z","size":2468,"stargazers_count":24,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-13T11:24:17.231Z","etag":null,"topics":["discussion","forum","laravel","laravel-forum"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaselia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["andreaselia","tomirons"]}},"created_at":"2018-09-22T19:17:32.000Z","updated_at":"2024-09-20T16:22:19.000Z","dependencies_parsed_at":"2023-01-15T00:20:17.545Z","dependency_job_id":null,"html_url":"https://github.com/andreaselia/laravel-firefly","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaselia%2Flaravel-firefly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaselia%2Flaravel-firefly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaselia%2Flaravel-firefly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaselia%2Flaravel-firefly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaselia","download_url":"https://codeload.github.com/andreaselia/laravel-firefly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817324,"owners_count":16885512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discussion","forum","laravel","laravel-forum"],"created_at":"2024-10-12T11:24:35.165Z","updated_at":"2024-10-28T10:32:12.503Z","avatar_url":"https://github.com/andreaselia.png","language":"PHP","funding_links":["https://github.com/sponsors/andreaselia","https://github.com/sponsors/tomirons"],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://img.shields.io/packagist/v/AndreasElia/laravel-firefly.svg)](https://packagist.org/packages/AndreasElia/laravel-firefly)\n[![PHP version](https://img.shields.io/packagist/php-v/AndreasElia/laravel-firefly.svg)](https://packagist.org/packages/AndreasElia/laravel-firefly)\n[![License](https://img.shields.io/packagist/l/AndreasElia/laravel-firefly.svg)](https://packagist.org/packages/AndreasElia/laravel-firefly)\n[![StyleCI](https://github.styleci.io/repos/149909240/shield?branch=master)](https://github.styleci.io/repos/149909240?branch=master)\n\n![Laravel Firefly Logo](/logo.png?raw=true \"Laravel Firefly Logo\")\n\n# Laravel Firefly\n\nFirefly is a simple forum package for Laravel, created for ease of use and expansion.\n\nThe 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.\n\n## Installation\n\nInstall the package:\n\n```bash\ncomposer require andreaselia/laravel-firefly\n```\n\nPublish package files (config, migrations, assets and views):\n\n```bash\nphp artisan vendor:publish --provider=\"Firefly\\FireflyServiceProvider\"\n```\n\nRun the migrations:\n\n```bash\nphp artisan migrate\n```\n\nAdd the FireflyUser trait to your User model:\n\n```php\n\u003c?php\n\nnamespace App\\Models;\n\nuse Firefly\\Traits\\FireflyUser;\nuse Illuminate\\Notifications\\Notifiable;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n    use HasFactory, Notifiable, FireflyUser;\n}\n```\n\n## Optional Features\n\n### Watchers\n\nYou can enable users to \"watch\" discussions by adding / updating the flag in the config:\n\n```php\n'features' =\u003e [\n    'watchers' =\u003e true,\n    // ...\n],\n```\n\nThis will allow watchers to be notified when new posts are made in the discussion\n\n### WYSIWYG Editor\n\nThe WYSIWYG Editor uses the Quill library, and the docs can be found [here](https://quilljs.com/docs).\n\nYou can enable a WYSIWYG editor by adding/updating the flag in the config like so:\n\n```php\n'features' =\u003e [\n    // ...\n    'wysiwyg' =\u003e [\n        'enabled' =\u003e true,\n        'theme' =\u003e 'snow', // More about themes at https://quilljs.com/docs/themes/\n        'toolbar_options' =\u003e [ // Docs at https://quilljs.com/docs/modules/toolbar/\n            ['bold', 'italic', 'underline', 'strike'],\n            [['list' =\u003e 'ordered'], ['list'=\u003e 'bullet']],\n            ['clean'],\n        ],\n    ],\n    // ...\n],\n```\n\nThe snow theme and basic editing controls are provided out of the box in the config, but these can be modified to fit your needs.\n\n### Correct Posts\n\nYou 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.\n\n**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`.\n\n```php\n'features' =\u003e [\n    'correct_posts' =\u003e true,\n    // ...\n],\n```\n\n### Reactions\n\nEnabling 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.\n\nIf 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 using`utf8mb4` charsets or newer, this is not needed.\n\n**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`.\n\n```php\n'features' =\u003e [\n    'reactions' =\u003e [\n        'enabled' =\u003e true,\n        'convert' =\u003e true\n     ]\n    // ...\n],\n```\n\n## Policies\n\nBy 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.\n\n1. Create your policy files via `php artisan make:policy MyGroupPolicy`\n2. In the generated class, extend the base Firefly policy:\n\n```php\n\u003c?php\n\nnamespace App\\Policies;\n\nuse Illuminate\\Auth\\Access\\HandlesAuthorization;\nuse Firefly\\Policies\\GroupPolicy;\n\nclass MyGroupPolicy extends GroupPolicy\n{\n    // ...\n```\n\n3. Implement whatever policy you wish (use the policies in `vendor/andreaselia/laravel-firefly/src/Policies` for reference)\n4. Update the policies array in the `app/Providers/AuthServiceProvider.php` file like so:\n\n```php\n\u003c?php\n\nuse Firefly\\Models\\Group;\n\n// ...\n\nprotected $policies = [\n    Group::class =\u003e 'App\\Policies\\MyGroupPolicy',\n];\n```\n\nLearn more about Laravel policies [here](https://laravel.com/docs/8.x/authorization#registering-policies).\n\n## Contributing\n\nYou'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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaselia%2Flaravel-firefly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaselia%2Flaravel-firefly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaselia%2Flaravel-firefly/lists"}