How to Get Timesince or Time ago in Laravel 10

In Laravel 10, you can get the timesince or time ago using the Carbon library. Carbon is a popular library for working with dates and times in PHP. Here’s an example of how to use Carbon to get the timesince or time ago in Laravel 10. <?php use Carbon\Carbon; // Example timestamp $timestamp = ‘2022-02-28 … Read more

How to Install October CMS

October CMS is built on Laravel  Framework, the best existing PHP framework. Laravel framework includes all the tools and classes necessary for making quality websites and applications. OctoberCMS adds even more power to Laravel’s simple and flexible features collection. Development with October can easily be adapted to any existing team workflow. Use your favorite version … Read more

Laravel Validation: Complete Step by Step Guide

Laravel  Framework provides many different approaches to validate your application’s form data. We can use the Validation differently in Laravel. For example, we can either use inside the controller’s method or create a FormRequest class to validate the incoming requests. In this tutorial, we will use all ways to validate Laravel forms. If you are … Read more

Laravel Facades: The Complete Guide

Laravel ships with so many facades provide access to almost all of Laravel’s features.  use Illuminate\Support\Facades\Cache; Route::get(‘/cache’, function () { return Cache::get(‘key’); }); Laravel Facades Laravel Facades provide a “static” interface to classes available in the application’s service container. Laravel facade serves as “static proxies” to underlying classes in the service container. All of Laravel’s facades … Read more

How to Create Word Document File in Laravel

The current version of PHPWord supports Microsoft Office Open XML (OOXML or OpenXML), OASIS Open Document Format for Office Applications (OpenDocument or ODF), and Rich Text Format (RTF), HTML, and PDF. You can also apply some basic styles to that document. As usual, we start our tutorial by installing Laravel first. How to Create a Word Document File in … Read more

Laravel Search: The Complete Guide

You can find the collection search method inside Illuminate\Support\Collection class. If you are not familiar with Laravel Collections, then check out my Laravel Collections guide. Laravel Search Laravel search() is a built-in collections method that is used to search the collection for a given value. If the value is present in the collection, the key of the value is … Read more

Laravel filter: The Complete Guide

Laravel Eloquent uses Collections to return the results. Collections contain useful methods that make them very powerful and helpful to use. You can filter them, modify them, and much more with them very conveniently. This then results in your array being converted to a JavaScript object instead of an array. If you are not familiar … Read more

Laravel MongoDB CRUD: Complete Guide Step by Step

If You need more information about the Jessegers package, go to its Github. MongoDB is an open-source, cross-platform, document-oriented NoSQL database for high-volume data storage. MongoDB is written in C++. But, first, let’s outline our whole blog post. NoSQL (MongoDB) seems quite unpopular on Laravel, not because no one cares, but because not many people … Read more

Laravel Elasticsearch Tutorial: The Complete Guide

Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Laravel Elasticsearch To use Elasticsearch in Laravel, use the Elasticquent package. Elasticquent makes working with Elasticsearch and Eloquent models easier by mapping them to Elasticsearch types. You can use … Read more

Laravel 8 Route Groups: Complete Guide

 Routes Groups are helpful in the situation when you want to apply one attribute to all the routes. Laravel 8 Route Groups Laravel 8 route groups allow you to group all the routes related to your modules. Route group takes an array that can take attributes and callback function. The route group allows you to … Read more

Laravel 9 HTTP Testing: How to Use HTTP Testing

Testing an HTTP request is an important task as a backend developer in Laravel to verify that our project works fine. Gladly, Laravel provides a very fluent API to test the HTTP request. If you are new to testing the checkout my below article. Laravel 9 Testing Laravel HTTP Testing Laravel provides a remarkably fluent … Read more