• JavaScriptPHPHTMLCssPythonWordPressWeb developmentLinuxMySQLAndroid
    WindowsJavaC++ / C#LayoutReactUbuntuYiiDjangoProgramming1C-Bitrix
    LaravelSystem administrationTelegramJSONDebianPostgreSQLIOSGoogleHtaccessWindows Server
    GitMacOSGoogle ChromeCMSWooСommerceBootstrapNginxSQLUnityAPI
  • Ask
  • Leaders

Categories

JavaScriptPHPHTMLCssPythonWordPressWeb developmentLinuxMySQLAndroidWindowsJavaC++ / C#LayoutReactUbuntuYiiDjangoProgramming1C-BitrixLaravelSystem administrationTelegramJSONDebianPostgreSQLIOSGoogleHtaccessWindows ServerGitMacOSGoogle ChromeCMSWooСommerceBootstrapNginxSQLUnityAPI
Programming
JavaScript PHP HTML Css Python WordPress Web development Linux MySQL Android Windows Java C++ / C# Layout React Ubuntu Yii Django Programming 1C-Bitrix Laravel System administration Telegram JSON Debian PostgreSQL IOS Google Htaccess Windows Server
Make a leaderReport
E
E
Emil Rakhmatullin2019-09-03 17:07:01
Laravel
Emil Rakhmatullin, 2019-09-03 17:07:01

How to get 2 last records from Laravel DB?

I get the last entry like this:
$news= $blog->news()->latest()->first();

Reply
Answer the question

Answer the question

In order to leave comments, you need to log in

0 answer(s)
Similar questions
P
Polina Emelyanova2019-12-09 15:42:31
How to open a thank you page for a purchase if the store server returned 200? 3Reply
D
Dmitry Tarasov2020-01-24 13:11:51
How to correctly send a request from nodejs to php script? 1Reply
S
Sedbol2020-02-24 23:47:02
Is it possible to immediately get an array from the database when inserting into the database? 2Reply
D
deleted-mezhevikin2015-05-22 19:26:30
How to properly work with timestamp/carbon in laravel5? 2Reply
P
Petya Fox2019-10-08 17:46:21
Where can I find a package for adding text to a database without HTML? 1Reply

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question

banners