You've already forked pilot-sdk
update README; add Laravel stubs; add form support
This commit is contained in:
@@ -35,6 +35,11 @@ class PilotServiceProvider extends ServiceProvider
|
||||
Route::any('api/pilot', function (Request $request) {
|
||||
return $this->handleRequest($request);
|
||||
});
|
||||
|
||||
$this->commands([
|
||||
\Bluesquare\Pilot\Laravel\Commands\MakeAction::class,
|
||||
\Bluesquare\Pilot\Laravel\Commands\MakeMetric::class,
|
||||
]);
|
||||
}
|
||||
|
||||
protected function registerPilot()
|
||||
@@ -49,6 +54,10 @@ class PilotServiceProvider extends ServiceProvider
|
||||
|
||||
if (class_exists($class)) {
|
||||
$action = new $class;
|
||||
|
||||
if (method_exists($action, 'form'))
|
||||
$this->pilot->form($action->slug(), [$action, 'form']);
|
||||
|
||||
$this->pilot->action($action->slug(), [$action, 'handle']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user