app->singleton(RecentlyViewed::class, function ($app) { return new RecentlyViewed( $app['session'], $app['events'], 'recently_viewed', session()->getId() . '_recently_viewed', config('fleetcart.modules.product.config.recently_viewed') ); }); $this->app->alias(RecentlyViewed::class, 'recently_viewed'); } }