Git Product home page Git Product logo

pingcrm-react's Introduction

Ping CRM React

A demo application to illustrate how Inertia.js works with Laravel and React.

This is a port of the original Ping CRM written in Laravel and Vue.

Installation

Clone the repo locally:

git clone https://github.com/landish/pingcrm-react.git
cd pingcrm-react

Install PHP dependencies:

composer install

Install NPM dependencies:

npm install

Build assets:

npm run dev

Setup configuration:

cp .env.example .env

Generate application key:

php artisan key:generate

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 artisan migrate

Run database seeder:

php artisan db:seed

Run artisan server:

php artisan serve

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

Running tests

To run the Ping CRM tests, run:

phpunit

Credits

  • Original work by Jonathan Reinink (@reinink) and contributors
  • Port to Ruby on Rails by Georg Ledermann (@ledermann)
  • Port to React by Lado Lomidze (@landish)

pingcrm-react's People

Contributors

chr-ge avatar dependabot[bot] avatar graxmonzo avatar landish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pingcrm-react's Issues

Upgradation of laravel and inertia js

Please update the version of laravel and interia js with the latest one so that the users can easily clone and understand the things from the example

Upgrade to Laravel 8.x

Description

Update support for Laravel 8.x.

Required changes

  • Update composer requirements
  • Upgrade models to include new HasFactory trait
  • Upgrade factories to new class-based syntax
  • Move models to new Models directory and update usages
  • Update unit tests

OLD

hi.
Npm show that project has 28 vulnerabilities (7 moderate, 18 high, 3 critical)
and php version is 7.2
please update dependencies

Scroll position does not reset

Navigating between pages, the scroll position is maintained. It should reset to top of the page upon navigating from one page to another page. Eg. pagination links does not scroll back up to the top.

Pagination breaks when Model Caching is enabled (GeneaLabs/laravel-model-caching)

Hello,

I am using pingcrm-react to test numerous features for an upcoming project that I wish to build within the framework. I am experiencing a unique issue with pagination throwing an error, specifically when I pair a model with the Caching package "GeneaLabs/laravel-model-caching". I have used the caching package outside of the Inertia framework and it works great, however within the framework it has issues. Models by themselves still work great within Inertia with the Caching package enabled (via "use Cachable" declared in the Model's PHP file), however when a model is invoked via Laravel's Eloquent ORM with pagination, I receive the following error: "Serialization of 'class@anonymous' is not allowed", which from what I could gather is tied directly to the framework's code in the file "app/Providers/AppServiceProvider.php" for the "protected function registerLengthAwarePaginator()". I believe because the function uses the line "return new class (...array_values($values)) extends LengthAwarePaginator", it creates an anonymous class which causes the caching to break.

The method in which I am using to test this is adding both "use GeneaLabs\LaravelModelCaching\Traits\Cachable;" (file header) and "use Cachable" (inside the model) to the "Contact" model (in the file "app/Models/Contact.php"). When I access the page "/contacts" I receive the error.

I have also been able to successfully create a LengthAwarePaginator via cached data (directly via Illuminate\Pagination\LengthAwarePaginator), however due to it not being created by the function declared in "AppServiceProvider.php", the front-end does not correctly load the data.

Again this is a unique issue tied to a completely separate Laravel package (GeneaLabs/laravel-model-caching), but ultimately it would be wonderful if they could work in unison.

Please advise. Thank you!

CORS issues with BrowserSync

I'm using DDEV as my Docker backend env and when launching the project with BrowserSync, the project get loaded from localhost:3000 or similar.

The main pages load with no issue, but any XHR action (for example pagination) performed from the page throwing the following CORS errors:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://pingcrm-react.ddev.site/organizations?page=2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://projectddev.site/organizations?page=2. (Reason: CORS request did not succeed).

Sometimes the first XHR request works, but never the second or the following ones.

Is there anything I can do to make it work?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.