diff --git a/src/Controllers/LiveTinkerController.php b/src/Controllers/LiveTinkerController.php index fd4c26c..3e081d6 100644 --- a/src/Controllers/LiveTinkerController.php +++ b/src/Controllers/LiveTinkerController.php @@ -8,13 +8,6 @@ class LiveTinkerController extends Controller { - public function __construct() - { - if (! env('APP_DEBUG')) { - abort(403); - }; - } - public function index() { return view('live-tinker::index'); diff --git a/src/LiveTinkerServiceProvider.php b/src/LiveTinkerServiceProvider.php index 983e098..e797737 100644 --- a/src/LiveTinkerServiceProvider.php +++ b/src/LiveTinkerServiceProvider.php @@ -30,7 +30,9 @@ public function boot() public function register() { - include __DIR__.'/routes.php'; - $this->app->make('Erjanmx\LiveTinker\Controllers\LiveTinkerController'); + if (env('APP_DEBUG')) { + include __DIR__.'/routes.php'; + $this->app->make('Erjanmx\LiveTinker\Controllers\LiveTinkerController'); + }; } }