Skip to content

Instantly share code, notes, and snippets.

@suehok
Created July 19, 2019 03:04
Show Gist options
  • Save suehok/842739b87c7cc87eee76cd29d21342b4 to your computer and use it in GitHub Desktop.
Save suehok/842739b87c7cc87eee76cd29d21342b4 to your computer and use it in GitHub Desktop.
Enable PublishAction when Laravel boot up
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use TCG\Voyager\Facades\Voyager;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Enable custom action for publish posts
Voyager::addAction(\App\Actions\PublishAction::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment