Skip to content

codegor/laravel-vuex-resapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codegor/laravel-vuex-resapi

Laravel Source Build Status License Total Downloads

This is a laravel event part of Vuex API library for Laravel REST Controller, with model example. When you want to use Laravel Echo with vuex-laravel-resource-api this is a backend for broadcasting event of Laravel Echo.

How to use?

In a model at the boot section you can emmit WS event for Resapi.

Like this:

//...
use Codegor\Resapi\Events\UpdateData;

class Manager extends Model {
    protected static function boot() {
      // ...
      static::saved(function($m){broadcast(new UpdateData('manager', $m->user_id))->toOthers();});  
    }
    
    // ...
}

See example/Manager.php for fool example.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages