katsana / minions-polyfill
Minions Component Server (Polyfill) using Laravel Routing
Installs: 41 829
Dependents: 0
Suggesters: 1
Security: 0
Stars: 2
Watchers: 5
Forks: 1
Open Issues: 0
Requires
- illuminate/http: ^6.0 || ^7.0 || ^8.0
- katsana/minions: ^1.7 || ^2.3
Requires (Dev)
- clue/block-react: ^1.3
- orchestra/canvas: ^4.5 || ^5.0 || ^6.0
- orchestra/testbench-dusk: ^4.6 || ^5.0 || ^6.0
README
Installation
Minions can be installed via composer:
composer require "katsana/minions-polyfill=^1.0"
Please ensure that you already install Minions and go through the installation and setup documentation.
Usages
To use Laravel Routing to handle RPC request you just need to setup the URI and TLD domain to handle the request. To do this this package has already add a macro to Illuminate\Routing\Router
.
It is recommended that you add the command to App\Providers\RouteServiceProvider::map()
method.
<?php namespace App\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { // ... /** * Define your route model bindings, pattern filters, etc. * * @return void */ public function boot() { Route::minion('rpc'); parent::boot(); } // ... }
You can also set it to a specific domain using the following:
Route::minion('/', 'rpc.your-domain');