Ping CRM on Yii 2 ¶
A Yii 2 demo application to illustrate how Inertia.js works.
With Inertia you are able to build single-page apps using classic server-side routing and controllers, without building an API.
This application is a port of the original Ping CRM written in Laravel and based on the Yii 2 Basic Project Template.
Based on the application Ping CRM on Yii 2 github and yii extension.
Changes: Updated Vue to version 3, updated npm packages and composer. Converted Vue files to Composition API (script setup).
Demo ¶
Installation ¶
Clone the repo locally:
git clone https://github.com/toatall/pingcrm-yii2-vue3 pingcrm-yii2-vue3
cd pingcrm-yii2-vue3
Install PHP dependencies:
composer install
Install NPM dependencies:
npm ci
Build assets:
npm run css-dev
npm run dev
Create an SQLite database. You can also use another database (MySQL, Postgres), simply update your configuration accordingly.
touch database/database.sqlite
Run database migrations:
php yii migrate
Run database seeder:
php yii db/seed
Run the dev server (the output will give the address):
php yii serve
You're ready to go! Visit Ping CRM in your browser, and login with:
- Username: johndoe@example.com
- Password: secret
Running tests ¶
To run the Ping CRM tests, run:
(to be done)
Requirements ¶
- PHP >=7.4.0
- Node.js & NPM
- SQLite
Extending this project ¶
The following steps are required when extending this project with new features.
In the backend ¶
- add new controller, that extends from inertia controller
- add one ore more actions
- return from the actions with a call to the inertia render method
<?php
namespace app\controllers;
use tebe\inertia\web\Controller;
class CustomController extends Controller
{
public function actionIndex()
{
$params = [
'data' => [],
];
return $this->inertia('demo/index', $params);
}
}
You can find more information at https://github.com/tbreuss/yii2-inertia.
In the frontend ¶
- add a new page under
resources/js/Pages
for each controller action you added in the backend - copy&paste one of the existing page examples
- implement and/or extend Vue.js stuff as needed
- use frontend tooling as described here and in package.json
You can find more information at https://inertiajs.com.
Credits ¶
- Original work by Jonathan Reinink (@reinink) and contributors
- Port to Yii 2 by Thomas Breuss (@tbreuss)
- Modified by @toatall (https://github.com/toatall)
"Ping CRM on Yii 2 is a solid solution for managing customer relationships within a Yii The integration with Yii’s powerful features like ActiveRecord and its easy scalability make it a great choice for small to medium businesses looking to streamline communication with customers. One thing to consider is ensuring smooth syncing between your CRM and other tools you're using (email, social media, etc.) for a seamless workflow. Also, optimizing the database queries for performance can really make a difference as the number of customers grows. Anyone here had success [customizing (https://infopoint.8171newspk.com/) it further or integrating with other platforms?"
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.