app/Providers/AppServiceProvider.php
/**
     * Bootstrap any application services.
     *
     * @return void
     */
Bootstrap any application services.
@return void
Bootstrap any application services . @return void
public function boot()
    {
        View::share('trackuser', TrackUser::all());
        View::share('trackuser_currentday', TrackUser::where("date", date("Y-m-d") )->get() );
        View::share('trackuser_currentmonth', TrackUser::all()->filter(function ($value, $key){
            return substr($value->date, 0,7) == date("Y-m");
        }));
        View::share('periode', Periode::simplePaginate(4));
        Paginator::useBootstrap();
    }
public function boot ( ) { View :: share ( 'trackuser' , TrackUser :: all ( ) ) ; View :: share ( 'trackuser_currentday' , TrackUser :: where ( " date " , date ( " Y-m-d " ) ) -> get ( ) ) ; View :: share ( 'trackuser_currentmonth' , TrackUser :: all ( ) -> filter ( function ( $ value , $ key ) { return substr ( $ value -> date , 0 , 7 ) == date ( " Y-m " ) ; } ) ) ; View :: share ( 'periode' , Periode :: simplePaginate ( 4 ) ) ; Paginator :: useBootstrap ( ) ; }
Bootstrap any application services.
Bootstrap any application services .
// dd(TrackUser::all());