{"id":13405313,"url":"https://github.com/thedevdojo/chatter","last_synced_at":"2025-03-14T09:32:41.340Z","repository":{"id":41207579,"uuid":"64518333","full_name":"thedevdojo/chatter","owner":"thedevdojo","description":"Chatter is a Simple Laravel Forum Package","archived":false,"fork":false,"pushed_at":"2022-09-20T13:43:49.000Z","size":2338,"stargazers_count":900,"open_issues_count":111,"forks_count":295,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-03-06T02:56:48.883Z","etag":null,"topics":["chatter","discussion","forum","laravel-forum"],"latest_commit_sha":null,"homepage":"https://devdojo.com/forums","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/thedevdojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-30T00:43:40.000Z","updated_at":"2025-02-06T11:53:05.000Z","dependencies_parsed_at":"2022-08-26T04:51:06.773Z","dependency_job_id":null,"html_url":"https://github.com/thedevdojo/chatter","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Fchatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Fchatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Fchatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Fchatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedevdojo","download_url":"https://codeload.github.com/thedevdojo/chatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243554303,"owners_count":20309908,"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":["chatter","discussion","forum","laravel-forum"],"created_at":"2024-07-30T19:01:58.886Z","updated_at":"2025-03-14T09:32:40.811Z","avatar_url":"https://github.com/thedevdojo.png","language":"PHP","funding_links":[],"categories":["PHP","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"300\" src=\"https://raw.githubusercontent.com/thedevdojo/chatter/master/public/assets/images/logo.png\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/thedevdojo/chatter\"\u003e\u003cimg src=\"https://travis-ci.org/thedevdojo/chatter.svg?branch=master\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://styleci.io/repos/64518333/shield?style=flat\"\u003e\u003cimg src=\"https://styleci.io/repos/64518333/shield?style=flat\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/devdojo/chatter\"\u003e\u003cimg src=\"https://poser.pugx.org/devdojo/chatter/downloads.svg?format=flat\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/devdojo/chatter\"\u003e\u003cimg src=\"https://poser.pugx.org/devdojo/chatter/v/stable.svg?format=flat\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/tcg/voyager\"\u003e\u003cimg src=\"https://poser.pugx.org/devdojo/chatter/license.svg?format=flat\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Laravel Forum Package - Chatter\n\n### Installation\n\nQuick Note: If this is a new project, make sure to install the default user authentication provided with Laravel. `php artisan make:auth`\n\n1. Include the package in your project\n\n    ```\n    composer require \"devdojo/chatter=0.2.*\"\n    ```\n\n2. Add the service provider to your `config/app.php` providers array:\n\n   **If you're installing on Laravel 5.5+ skip this step**\n\n    ```\n    DevDojo\\Chatter\\ChatterServiceProvider::class,\n    ```\n\n3. Publish the Vendor Assets files by running:\n\n    ```\n    php artisan vendor:publish --provider=\"DevDojo\\Chatter\\ChatterServiceProvider\"\n    ```\n\n4. Now that we have published a few new files to our application we need to reload them with the following command:\n\n    ```\n    composer dump-autoload\n    ```\n\n5. Run Your migrations:\n\n    ```\n    php artisan migrate\n    ```\n\n    Quick tip: Make sure that you've created a database and added your database credentials in your `.env` file.\n\n6. Lastly, run the seed files to seed your database with a little data:\n\n    ```\n    php artisan db:seed --class=ChatterTableSeeder\n    ```\n\n7. 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:\n\n    ```\n    @yield('css')\n    ```\n\n    Then, right above the `\u003c/body\u003e` tag of your master file add the following:\n\n    ```\n    @yield('js')\n    ```\n\nNow, visit your site.com/forums and you should see your new forum in front of you!\n\n### Upgrading\n\nMake sure that your composer.json file is requiring the latest version of chatter:\n\n```\n\"devdojo/chatter\": \"0.2.*\"\n```\n\nThen you'll run:\n\n```\ncomposer update\n```\n\nNext, you may want to re-publish the chatter assets, chatter config, and the chatter migrations by running the following:\n\n```\nphp artisan vendor:publish --tag=chatter_assets --force\nphp artisan vendor:publish --tag=chatter_config --force\nphp artisan vendor:publish --tag=chatter_migrations --force\n```\n\nNext to make sure you have the latest database schema run:\n\n```\nphp artisan migrate\n```\n\nAnd you'll be up-to-date with the latest version :)\n\n### Markdown editor\n\nIf you are going to make use of the markdown editor instead of tinymce you will need to change that in your config/chatter.php:\n\n```\n'editor' =\u003e 'simplemde',\n```\n\nIn order to properly display the posts you will need to include the  `graham-campbell/markdown` library for Laravel:\n\n```\ncomposer require graham-campbell/markdown\n```\n\n### Trumbowyg editor\n\nIf you are going to use Trumbowyg as your editor of choice you will need to change that in your config/chatter.php:\n\n```\n'editor' =\u003e 'trumbowyg',\n```\n\nTrumbowyg requires jQuery \u003e= 1.8 to be included.\n\n### VIDEOS\n\n[Introduction and Installation of Chatter](https://devdojo.com/episode/create-a-laravel-forum)\n\n### Configuration\n\nWhen 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\n\n### Customization\n\n*CUSTOM CSS*\n\nIf you want to add additional style changes you can simply add another stylesheet at the end of your `@yield('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 following `if` statement:\n\n```\n@if(Request::is( Config::get('chatter.routes.home') ) || Request::is( Config::get('chatter.routes.home') . '/*' ))\n    \u003c!-- LINK TO YOUR CUSTOM STYLESHEET --\u003e\n    \u003clink rel=\"stylesheet\" href=\"/assets/css/forums.css\" /\u003e\n@endif\n```\n\n*SEO FRIENDLY PAGE TITLES*\n\nSince 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 `\u003chead\u003e` of your master file:\n\n```\n@if( Request::is( Config::get('chatter.routes.home')) )\n    \u003ctitle\u003eTitle for your forum homepage -  Website Name\u003c/title\u003e\n@elseif( Request::is( Config::get('chatter.routes.home') . '/' . Config::get('chatter.routes.category') . '/*' ) \u0026\u0026 isset( $discussion ) )\n    \u003ctitle\u003e{{ $discussion-\u003ecategory-\u003ename }} - Website Name\u003c/title\u003e\n@elseif( Request::is( Config::get('chatter.routes.home') . '/*' ) \u0026\u0026 isset($discussion-\u003etitle))\n    \u003ctitle\u003e{{ $discussion-\u003etitle }} - Website Name\u003c/title\u003e\n@endif\n```\n\n*OVERRIDING VIEWS*\n\nIn 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.\n\n- [home.blade.php](https://github.com/thedevdojo/chatter/blob/master/src/Views/home.blade.php)\n- [discussion.blade.php](https://github.com/thedevdojo/chatter/blob/master/src/Views/discussion.blade.php)\n\n### Custom Function Hooks for the forum\n\nSometimes you may want to add some additional functionality when a user creates a new discussion or adds a new response. Well, there are a few built in functions that you can create in your script to access this functionality:\n\n*Before User Adds New Discussion*\nCreate a new global function in your script called:\n```\nfunction chatter_before_new_discussion($request, $validator){}\n```\n\nNote: that the `$request` object is passed with the user input for each webhook. You can use it if you would like :) If not, no worries just add your custom functionality.\n\n*After User Adds New Discussion*\nCreate a new global function in your script called:\n```\nfunction chatter_after_new_discussion($request){}\n```\n\n*Before User Adds New Response*\nCreate a new global function in your script called:\n```\nfunction chatter_before_new_response($request, $validator){}\n```\n\n*After User Adds New Response*\nCreate a new global function in your script called:\n```\nfunction chatter_after_new_response($request){}\n```\n\n### Laravel [Events](https://laravel.com/docs/events) for the forum\n\nThis package provides a number of events allowing you to respond to user actions as they happen:\n\n| Event        | Available properties           | Description  |\n| ------------- |:-------------:| -----:|\n| `ChatterBeforeNewDiscussion`      | `Illuminate\\Http\\Request ($request)`, `Illuminate\\Validation\\Validator ($validator)` | This event is fired *before* a discussion is validated and created |\n| `ChatterAfterNewDiscussion`      | `Illuminate\\Http\\Request ($request)`, `Models::discussion() ($discussion)`, `Models::post() ($post)` | This event is fired *after* a discussion has been validated and created |\n| `ChatterBeforeNewResponse`      | `Illuminate\\Http\\Request ($request)`, `Illuminate\\Validation\\Validator ($validator)` | This event is fired *before* a response is validated and created |\n| `ChatterAfterNewResponse`      | `Illuminate\\Http\\Request ($request)`, `Models::post() ($post)` | This event is fired *after* a response is validated and created |\n\n#### Listening for Events\nTo register your listeners for these events, follow the [Laravel documentation for registering events and listeners](https://laravel.com/docs/events#registering-events-and-listeners).\nFor example, to register a listener for the \"before new discussion\" event, add the following to your `EventServiceProvider`:\n\n```php\nprotected $listen = [\n    'DevDojo\\Chatter\\Events\\ChatterBeforeNewDiscussion' =\u003e [\n        'App\\Listeners\\HandleNewDiscussion',\n    ],\n];\n```\n\nwhere `App\\Listeners\\HandleNewDiscussion` is a class in your application which handles the event when it's fired.\n\nYou can access the object that triggered the event in your listener with\n```php\n    public function handle(ChatterAfterNewDiscussion $event)\n    {\n        // $event-\u003ediscussion\n        // $event-\u003epost\n    }\n```\nand \n```php\n    public function handle(ChatterAfterNewResponse $event)\n    {\n        // $event-\u003epost\n    }\n```\n\n### Screenshots\n\n![](https://raw.githubusercontent.com/thedevdojo/chatter/master/public/assets/images/chatter-screenshot.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevdojo%2Fchatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedevdojo%2Fchatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevdojo%2Fchatter/lists"}