data_forget Helper for Laravel
Since Laravel version 10.15, there is a new utility function called data_forget that allows you to remove keys from an array or object using a "dot" notation.
3 min read
Tags:
In today's fast-paced ecommerce world, having a unique edge can set you apart from the competition. In this article, we will learn how to build a lunar-powered headless ecommerce website with Laravel, combining the fascination with everything lunar with the flexibility of headless ecommerce.
You can create a lunar-themed online store with its robust features, scalability, and flexibility by using Laravel Lunar, a headless ecommerce platform that integrates seamlessly with Laravel.
The following are the essentials you'll need before you begin the installation process:
1 - Install Laravel via Composer if you don't already have it: Here's a tutorial to install Composer
composer global require laravel/installer
2 - To compile assets, download Node.js and NPM from nodejs.org.
3 - If you don't already have Composer, get it from getcomposer.org
4 - Laravel supports MySQL and SQLite as database engines.
5 - To keep things organized, install Git from git-scm.com
6 - Install Laravel Lunar from GitHub into your Laravel project's root directory:
git clone https://github.com/lunar/ecommerce.git
We'll break down the installation process step by step now that you've got all your ducks in a row:
Using the Laravel installer, create a new Laravel project as follows:
laravel new lunar-ecommerce
cd lunar-ecommerce
Next, you'll need to specify the database type, host, username, and password in the .env file at the root of your project.
Now, let's bring it into the mix. Navigate to your project's root directory and execute this command:
composer require lunarphp/lunar
There are certain relationships that must be set up in the User model for certain parts of the core to work. You must add this trait to all models that represent users.
use Lunar\Base\Traits\LunarUser;
// ...
class User extends Authenticatable
{
use LunarUser;
// ...
}
php artisan lunar:install
This will take you through a set of questions to configure your Lunar install. The process includes
Creating a default admin user (if required)
Seeding initial data
Inviting you to star our repo on GitHub ⭐
By running this command, you can publish the Laravel Lunar configuration files:
php artisan vendor:publish --tag=lunar
You can optionally publish Lunar migrations so they're added to your Laravel app
php artisan vendor:publish --tag=lunar.migrations
With Lunar, you can create a one-of-a-kind online shopping experience. Here are the steps you need to take to launch your lunar-themed ecommerce project and explore the endless possibilities of headless Laravel ecommerce. I wish you astronomical sales and an experience like no other!
To access the complete documentation, please visit the official Website at:
Full-stack developer with a knack for Merging creativity with technical expertise for standout solutions.
Since Laravel version 10.15, there is a new utility function called data_forget that allows you to remove keys from an array or object using a "dot" notation.
The ChatGPT Laravel API Package Generator package for Laravel generates smart API mocks in Laravel using ChatGPT prompts:
You can make your Laravel app multi-tenant using the Tenancy for Laravel Tenant package. This tenancy package lets you make any Laravel application multi-tenant without rewriting it.
Are you ready to take your Laravel skills to the next level and build extraordinary applications? Look no further! In this blog post, we will unveil a treasure trove of top packages that will revolutionize your development process.
The Livewire Tables package brings dynamic tables for models to Laravel Livewire. These are some of the features which you will get out of the box:
ImageMagick is a powerful tool for image manipulation, and integrating it with PHP can enhance your web development projects.
Subscribe for 20+ new Laravel tutorials every week
You can unsubscribe at any time. You'll also get -20% off my courses!