mercredi 25 décembre 2019

Change view path of package in runtime

Laravel Version : 5.7

I'm using thekordy/ticktit package for ticketing system , and it support two bootstrap version .

And its set the view package path base on the bootstrap field in database . I need change the

//in the package service Provider 

$viewsDirectory = __DIR__.'/Views/bootstrap3';            
if (Setting::grab('bootstrap_version') == '4') {
    $viewsDirectory = __DIR__.'/Views/bootstrap4';
}
// the grab get bootstrap version from database

I have two panels with two different bootstrap version and want to set bootstrap version base on users roles but as you know i can't check the authenticated user in serviceProvider.php.

I got stuck , how can i handle this?

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire