If you are CRM or ERP developer, experienced in PHP, you should have already heard about Hubleto. It is an opensource PHP-based CRM solution with a comprehensive set of features and modules in its free community version.
Here in this post, I will show how to easily create a boilerplate code and custom CRUD in a custom app (or module, if you wish).
Simply follow these steps and in few minutes you will have working CRM with your custom code.
Create Hubleto ERP project
Run composer to install Hubleto:
composer create-project hubleto/erp-project
This will download the Hubleto's source code and all of its dependencies.
Install it
Go to the folder where you created the project and run:
php hubleto init
This will install the database and create a default configuration. You will need to answer several questions (in most cases the default values are enough).
When done, your default Hubleto will be ready to use.
Create a custom app
In Hubleto, you can create unlimited number of custom apps. In this example, we will create an app for car rental management.
Run:
php hubleto create app CarRental
Add models
Each car rental management app needs a list of cars. We create a model Car that will hold the information about each car.
Run:
php hubleto create model CarRental Car
You may repeat this process any number of times to create all models you need.
Add controllers, views and UI
Now, we have only models. Models are installed in the database but we do not have any UI to manage the data. Let's create it.
Run:
php hubleto create mvc CarRental Car
And that's it. Easy. This will create PHP controllers, TWIG views and React UI components. Now repeat the command for each model you created before.
Create UI for model Car
Compile everything together
Last step is to compile the React Javascript files and Tailwind CSS files.
Run:
npm install @hubleto/react-ui
npm run build
Done
Now you're done. You can open you Hubleto at https://localhost/hubleto/erp-project (or similar, based on your environment setup) and manage cars.





Top comments (0)