clsystems/clslim

Skeleton Framework with Slim 4, PHP-DI and Eloquent ORM. Quick setup with Robo

v1.0.0 2019-09-17 08:25 UTC

This package is auto-updated.

Last update: 2020-02-18 06:35:56 UTC


README

For developers, CLSlim is an opinionated PHP framework used to quickly create CRUD based RESTful APIs.

CLSlim is a marriage between Slim 4 and Eloquent ORM with Robo as your wedding planner.

CLSlim is opinionated meaning that CLSlim stresses convention over configuration.

CLSlim works best as a framework in the following situation:

  • You need to quickly spin up a RESTful datacentric API
  • You already have defined your database with entities (tables/views) already in place
  • You are just starting your project (for the backend API handler) and need to hit the ground running

Requirements

  • PHP 7.1+
  • MySQL 5.6+ or SQLite3 (Postgres and MSSQL should also work but are untested)
  • Composer

Installation

From a terminal / command window run:

composer create-project clsystems/clslim [your-project-name]
cd [your-project-name]

// Linux / Mac users do this:
./clslim clslim:sample

// Windows execute this:
php -S localhost:8088 -t public
// Then in your favorite web browser go to: localhost:8088/v1/sample/hello-world

The result should look something like this:

{
  "authenticated": true,
  "success": true,
  "status": 200,
  "data": {
    "id": "hello-world"
  },
  "missing": [ ],
  "message": "Sample test",
  "timestamp": 1556903905
}