Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

towhid's avatar

Scenario : in my blade as a news paper category , first item information show big view but other s item ar small show , how can i view data in blade from database? what kind of query ?need to write

how can i view data in blade from database? what kind of query need to write ?

0 likes
4 replies
towhid's avatar

@Tray2 there are not accurate my questions answer , could you please read my query again , if you can accurate please help me . thank you

Cronix's avatar
Cronix
Best Answer
Level 67

Your question isn't clear. The query would be the same, whether it returns a lot of data for a column, or a little. It doesn't matter. The query to get the data is the same.

You'll need to learn some basic laravel stuff.

  1. the controller is the thing that does the querying, not "blade"
  2. The controller passes the data to the view.
  3. In the view, you render the data.

Please learn the basics of laravel. Here is a very good series that's free. https://laracasts.com/series/laravel-from-scratch-2017

If after watching that, and trying on your own, and you still can't get it to work, then ask the question again and show your code that you tried.

1 like
towhid's avatar

@cronix i found my answer actually i didn't ask you accurate question because of those moment i don't know many Eloquent Query -

my query is first() , latest () and selected id wise data show -

like one newspaper page - show some - image - last five , and in below show data after five :)

Please or to participate in this conversation.