Skip to content

Commit

Permalink
Patch debug mode only (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
erjanmx authored May 18, 2018
1 parent 63f650c commit 02a2322
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/Controllers/LiveTinkerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 4 additions & 2 deletions src/LiveTinkerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
}
}

0 comments on commit 02a2322

Please sign in to comment.