I am developing a Laravel project. I am using Laravel 5.1. In my project, I share data in all views in the upload method appServiceProvider.
function boot()
{
$items = $this->itemRepo->getItems(session("key"));
view()->share('items', array('items'=>$items));
}
But the value of the session is always zero. I have seen many articles on the Internet. But they did not work. So please, how can I convey my session value?
source
share