S
S
stdio962016-06-07 18:10:38
Laravel
stdio96, 2016-06-07 18:10:38

SQL query on all pages in Laravel?

Hello. I need your help.
There is a site on Laravel 5.2. The structure is like this:

  1. navbar
  2. content
    content (the only thing that changes on every page)
    sidebar
  3. footer

I want the nicknames of the most active users to be displayed in the sidebar. There are no problems with building a query, but how to make this query visible on all pages , since this is a sidebar. Or an array that will return a request to be available on all pages.
PS: I use Blade.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-06-07
@stdio96

https://laravel.com/docs/5.2/views#sharing-data-wi...
https://laravel.com/docs/5.2/views#view-composers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question