Thread Reply

  1. Got 2 Votes
    February 26, 2017 at 4:04 am

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    Set it as the font John Doe Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam fringilla augue nec est tristique auctor. Donec non est at libero vulputate rutrum.

    public function popular($parent = null,$child = null)
      {     
        $products =  Product::with('subcategory')->with('subchild')->paginate(16)->sortByDesc('view_cache');
        return view('Frontend.listing.popular')->with(['products'=>$products]);
       }
       
       
       namespace AppProviders;
    
    use IlluminateContractsEventsDispatcher as DispatcherContract;
    use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider;
    
    class EventServiceProvider extends ServiceProvider
    {
        /**
         * The event listener mappings for the application.
         *
         * @var array
         */
        protected $listen = [
            'AppEventsSomeEvent' => [
                'AppListenersEventListener',
            ],
        ];
    
        /**
         * The subscriber classes to register.
         *
         * @var array
         */
        protected $subscribe = [
            'AppListenersUserEventListener',
        ];
    
        /**
         * Register any other events for your application.
         *
         * @param  IlluminateContractsEventsDispatcher  $events
         * @return void
         */
        public function boot(DispatcherContract $events)
        {
            parent::boot($events);
        }
    }
    																		 

    Best Answer
  2. February 26, 2017 at 4:10 am

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    Set it as the font John Doe Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam fringilla augue nec est tristique auctor. Donec non est at libero vulputate rutrum.

    public function popular($parent = null,$child = null)
      {     
        $products =  Product::with('subcategory')->with('subchild')->paginate(16)->sortByDesc('view_cache');
        return view('Frontend.listing.popular')->with(['products'=>$products]);
       }
       
       
       namespace AppProviders;
    
    use IlluminateContractsEventsDispatcher as DispatcherContract;
    use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider;
    
    class EventServiceProvider extends ServiceProvider
    {
        /**
         * The event listener mappings for the application.
         *
         * @var array
         */
        protected $listen = [
            'AppEventsSomeEvent' => [
                'AppListenersEventListener',
            ],
        ];
    
        /**
         * The subscriber classes to register.
         *
         * @var array
         */
        protected $subscribe = [
            'AppListenersUserEventListener',
        ];
    
        /**
         * Register any other events for your application.
         *
         * @param  IlluminateContractsEventsDispatcher  $events
         * @return void
         */
        public function boot(DispatcherContract $events)
        {
            parent::boot($events);
        }
    }
    																		 

    Best Answer

Leave an answer