PHP code example of skyraptor / chatter

1. Go to this page and download the library: Download skyraptor/chatter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

skyraptor / chatter example snippets


protected $listen = [
    \SkyRaptor\Chatter\Events\ChatterBeforeNewDiscussion::class => [
        \App\Listeners\HandleNewDiscussion::class,
    ],
];

    public function handle(ChatterAfterNewDiscussion $event)
    {
        // $event->discussion
        // $event->post
    }

    public function handle(ChatterAfterNewResponse $event)
    {
        // $event->post
    }

    php artisan vendor:publish --provider="SkyRaptor\Chatter\Providers\ChatterServiceProvider"
    

    composer dump-autoload
    

    php artisan migrate
    

    php artisan db:seed --class=SkyRaptor\Chatter\Seeders\ChatterTableSeeder
    

php artisan vendor:publish --tag=chatter-resources --force
php artisan vendor:publish --tag=chatter-assets --force

php artisan migrate