Laravel 5 – global Blade view variable available in all templates
Option 1: You can use view::share() like so: <?php namespace App\Http\Controllers; use View; //You can create a BaseController: class BaseController extends Controller { public $variable1 = “I am Data”; public function __construct() { $variable2 = “I am Data 2”; View::share ( ‘variable1’, $this->variable1 ); View::share ( ‘variable2’, $variable2 ); View::share ( ‘variable3’, ‘I am Data … Read more