Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

Basic Query in Laravel PHP Framework Advance

Laravel Database Queries

Query 12=>Show or get recently or last 6 data entered by user

Three method : first method

$dogs = Package::orderBy(‘id’, ‘desc’)->take(5)->get(); return $dogs;

Second Method

$dogs = Package::latest()->take(5)->get(); return $dogs;

third Method

$dogs= Package::orderBy(‘id’, ‘DESC’)->limit(5)->get(); return $dogs;

Query 13=>Get all data except skip 4 first data which is added by tour Operator

Query 14=>Get single data which trip is recently added by Tour Operator

Query 15=>Get single data which trip is recently added by Tour Operator and email is Dharmendra.cotocus@gmail.com

Query 16=>Get trip detail, image detail iternary detail wich following details

  1. Publish trip and email is ajay.cotocus@gmail.com
  2. Publish trip and email is dharmendra.cotocus@gmail.com
  3. Publish trip and email is vijay.cotocus@gmail.com

Query 16=>Get trip details image  detail  iternary detail with following detail

  1. The country is india and email dharmendra.cotocus@gmail.com
  2.   The country is malysia and email ajay.cotocus@gmail.com
  3.   The country is india and email vijay.cotocus@gmail.com

Related Posts

How to Deploy a Laravel Project on a Linux Server Using HTDOCS and GitHub – Complete Step-by-Step Guide

Deploying a Laravel project on a Linux server becomes simple when you follow a structured process. In this guide, we will deploy a Laravel project by cloning Read More

Read More

How to Install and Enable GMP Extension in XAMPP PHP on Linux (Step-by-Step Guide)

Introduction If you are using XAMPP PHP on a Linux server and encounter errors like: then this usually means the GMP extension is not installed, not just Read More

Read More

How to Run an HTML Website Alongside a Laravel Project on the Same Server

Running a Laravel application is common for dynamic web platforms, dashboards, and APIs. However, many businesses and developers also want to run a simple HTML website on Read More

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x