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()
    {
        Schema::defaultStringLength(191);
         Share view for Common Data
        $settings = Setting::where('status', '1')->get();
        $categories = VideoCategory::where('status', '1')->orderBy('title', 'asc')->get();
        $socials = Social::where('status', '1')->get();
        $tags = Tag::where('status', '1')->orderBy('views', 'desc')->get();
        $popular_tags = Tag::where('status', '1')->orderBy('views', 'desc')->take(10)->get();
        $ads = Ad::where('status', '1')->get();
        View::share(['settings' => $settings, 'categories' => $categories, 'socials' => $socials, 'tags' => $tags, 'popular_tags' => $popular_tags, 'ads' => $ads]);
    }
public function boot ( ) { Schema :: defaultStringLength ( 191 ) ; $ settings = Setting :: where ( 'status' , '1' ) -> get ( ) ; $ categories = VideoCategory :: where ( 'status' , '1' ) -> orderBy ( 'title' , 'asc' ) -> get ( ) ; $ socials = Social :: where ( 'status' , '1' ) -> get ( ) ; $ tags = Tag :: where ( 'status' , '1' ) -> orderBy ( 'views' , 'desc' ) -> get ( ) ; $ popular_tags = Tag :: where ( 'status' , '1' ) -> orderBy ( 'views' , 'desc' ) -> take ( 10 ) -> get ( ) ; $ ads = Ad :: where ( 'status' , '1' ) -> get ( ) ; View :: share ( [ 'settings' => $ settings , 'categories' => $ categories , 'socials' => $ socials , 'tags' => $ tags , 'popular_tags' => $ popular_tags , 'ads' => $ ads ] ) ; }
Bootstrap any application services.
Bootstrap any application services .
// // Share view for Common Data