samedi 2 décembre 2017

Dynamically hide Laravel barryvdh debugbar

I could not able to hide Laravel Debugbar dynamically, i.e on the run time. I have tried the following from parent Controller class constructor:

<?php

namespace App\Http\Controllers;
class Controller extends BaseController {

    use AuthorizesRequests,
        DispatchesJobs,
        ValidatesRequests;
    public $foo = 'null';

    public function __construct() {
        \Debugbar::disable();
      // and also
      config(['debugbar.enabled' => false]);
.... 

All of the above tries failed. I'd like to mention that controller is the parent controller of all other controllers' classes.

The only working way is not dynamic way, where I have to change configuration manually. I don't know why the override configurations doesn work as the documentation states?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire