Eloquent is a powerful ORM (Object-Relational Mapping) tool that allows developers to interact with databases in a more convenient and elegant way. One of the most powerful features of Eloquent is its ability to handle relationships between tables. In this article, we will explore how to order Eloquent’s hasMany relationship by a specific column in […]
Laravel
3 examples to Pass Global Variables to Blade: View Share and Composer
Overview: Laravel is a powerful PHP framework that allows developers to quickly and easily create web applications. One of the most important features of the framework is the ability to easily share data between different parts of the application. This can be accomplished by using Service Providers, which are classes that can be used to […]
How to create Laravel 8 CRUD Demo Application? Laravel Learnings for Beginners
In this tutorial, we will be creating a CRUD (Create, Read, Update, and Delete) application using Laravel 8, the latest version of the popular PHP framework. Laravel 8 offers several new features and Long-Term Support (LTS), making it a great choice for beginners who are new to the framework. The tutorial will guide you through […]
Solved: Method Illuminate\Database\Eloquent\Collection::paginate does not exist
A code with Error: In above code a Developer is trying to access records using Laravel Eloquent, however He is trying to use both ->get() as well as ->paginate() method at the same time. You should not do that, when we use paginate method to it handle get operations too, the only difference is that […]
How to create Laravel Application using WSL 2, Docker & Sail on Windows 10 or 11
This tutorial will give you steps on how to create Laravel application using Laravel Sail on WSL 2 (Ubuntu 20 or 22) on Windows platform. I assume you already have Docker Desktop installed on your Windows OS. Next follow the steps to get Ubuntu 22.04 up running with WSL. Install/configure WSL2 on Windows Open windows […]
Install Laravel Echo Server on Ubuntu 18, 20, 22
The first requirement of running laravel-echo-server on your Linux server is to have NodeJS installed. Follow my tutorial to learn how to install NodeJS on Ubuntu/Linux Installing Laravel-echo-server I assumed that you have already installed the NodeJS on your server and it is running Use following command to install the NPM package globally on your […]