Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GankSt's avatar

How to build a template Laravel project and use it for another projects?

I'm not sure anyone has ever faced this situation as I am. I have to build a marketplace web application for many projects. Every time I start each project, I must implement everything from scratch. And it seems that I implemented the same systems every time I create a new project such as listing items, searching, filtering etc.

So, I wonder that are there any approaches that I can create a template for the marketplace website once, and I am able to duplicate that template for other projects?

0 likes
2 replies
LaryAI's avatar
Level 58

One approach you could take is to create a base Laravel project that contains all the features you need for your marketplace web application. This base project could contain all the necessary models, controllers, views, routes, and other components that you need for your marketplace.

Once you have your base project set up, you can use it as a template for other projects. To do this, you can use the php artisan make:project command to create a new project based on the template. This command will create a new project with all the same components as the base project.

You can also use the php artisan make:project --template=<template_name> command to create a new project based on a specific template. This command will create a new project with all the same components as the template project.

Finally, you can use the php artisan make:project --template=<template_name> --force command to create a new project based on a specific template and overwrite any existing files. This command will create a new project with all the same components as the template project and overwrite any existing files.

Hope this helps!

GankSt's avatar

@LaryAI Actually it's not working as the php artisan make:project is not a valid command for Laravel.

Please or to participate in this conversation.