/Symfony-Inertia-Vue

A demo application to illustrate how Inertia.js works, ported to Symfony from Laravel

Primary LanguagePHPOtherNOASSERTION

Ping CRM on Symfony

CI

A demo application to illustrate how Inertia.js works, ported to Symfony from Laravel.

Screenshot

Tested on both PHP 7.4 and 8.0.

Installation

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-symfony

Install dependencies:

composer install
yarn install

Build assets:

yarn build

The 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-database

Run the dev server:

symfony serve

You're ready to go! Visit Ping CRM in your browser, and login with:

Running tests

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

Remarks

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!

Credits

Shout-outs to all Ping CRMs all over the world!