app/Providers/ViewServiceProvider.php
/**
     * Bootstrap any application services.
     *
     * @return void
     */
Bootstrap any application services.
@return void
Bootstrap any application services . @return void
public function boot()
    {
        View::composer('admin.*', function ($view) {
            $view->with('new_user_count', Customer::doesntHave('contactHistory')->count());
        });
    }
public function boot ( ) { View :: composer ( 'admin.*' , function ( $ view ) { $ view -> with ( 'new_user_count' , Customer :: doesntHave ( 'contactHistory' ) -> count ( ) ) ; } ) ; }
Bootstrap any application services.
Bootstrap any application services .
// add information to all admin dashboard views