A demo application to illustrate how Inertia.js works, ported to Symfony from Laravel.
Tested on both PHP 7.4 and 8.0.
Make sure you have the symfony binary (Symfony CLI) installed and in your PATH.
Clone the repo locally:
git clone https://github.com/aleksblendwerk/pingcrm-symfony.git pingcrm-symfony
cd pingcrm-symfonyInstall dependencies:
composer install
yarn installBuild assets:
yarn buildThe current configuration uses MySQL. Adjust the DATABASE_URL in .env accordingly
(or optionally create a .env.local file and put your overrides there).
Create the database, schema and load the initial data:
composer build-databaseRun the dev server:
symfony serveYou're ready to go! Visit Ping CRM in your browser, and login with:
- Username: johndoe@example.com
- Password: secret
Keep in mind to adjust the DATABASE_URL in .env.test accordingly
(or optionally create a .env.test.local file and put your overrides there).
Run the Ping CRM tests:
composer test
One of the goals for this port was to leave the original JS side of things unchanged. This promise has been kept, aside from one or two very minor changes. As a result, the PHP backend code occasionally has to jump through a few hoops to mimic the expected response data formats which are partly catered to Laravel's out-of-the-box features.
Also, I am currently not really satisfied with the whole validation workflow, this might eventually get an overhaul.
Consider this a proof of concept, I am sure there is room for improvements. If any fellow Symfony developers want to join in to tackle things in more concise or elegant ways, let's go for it!
- Original Ping CRM by Jonathan Reinink (@reinink) and contributors
- Inertia.js server-side adapter for Symfony by Hannes Vermeire (@rompetomp) and contributors
- This port by Aleks Seltenreich (@aleksblendwerk)
Shout-outs to all Ping CRMs all over the world!
