Download the PHP package slimphp-api/slim-api without Composer

On this page you can find all versions of the php package slimphp-api/slim-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim-api

slim-api

Basic slim api project and generator

Coverage Status Code Climate Build Status

Status

Alpha, init and create models/controllers/scaffolds is complete.

What?

A simple command line app for producing simple controllers/models/migrations, routes and DI, using Slim and symfony console.

External modules

By default the app uses phinx and eloquent for migrations and ORM, these are provided by external modules: slim-eloquent and slim-phinx

Why?

I wanted to be able to create API end points as easily as possible, and I love the simplicity of Slim, and after a sordid time with RoR this seemed like a fun thing to do!

How?

Installation

Install globally within your user account composer global require slimphp-api/slim-api dev-master
Make sure global composer is in your path export PATH=~/.composer/vendor/bin:$PATH in .bashrc

Init

Basic useage is simple, we first have to initiate the project, this creates a default skeleton for the project and initiates the phinx configuration.

Location defaults to the cwd if not specified.

If you use a different migration/orm/structure module you'll then have to re-init the appropriate source, such as:

This must be done from the root or your project after the init.

Models

We can then generate a model, this creates a migration, a simple model class and DI configuration.

Model definitions are a space seperated list of column definitions, of the form name:type:limit:null:unique, so

Would create a migration of 3 columns, baz would have a character limit and can't be null, bazbar would have a character limit and must be unique.

Controllers

We can create a controller, this creates a simple controller, route and DI configuration.

Methods defaults to index, get, post, put and delete and are empty by default. The controller name influences how the route is designed.

Would generate a controller named Foo with empty methods index and post. It would also create the GET/POST /foo route.

Would generate a controller named Foo with empty methods index, get, post, put, delete. It would also create the GET/POST /foo routes and the GET/PUT/DELETE /foo/{id} routes.

Scaffold

Scaffolding combines controller and model generation but with added jazz. It configures the controller to receive the model as a constructor param, configures the DI to inject the model to the controller and finally populates the normally empty controller methods with basic CRUD functionality. You can't provide arguments to specify controller methods (it creates them all), but you can supply your model definition.

This would generate the Foo controller and appropriate routes, the Foo model/migration with field1/field2 as fillables and any required DI configuration.


All versions of slim-api with dependencies

PHP Build Version
Package Version
Requires php Version >5.6
pimple/pimple Version ^3.0
symfony/console Version ^2.7
slimphp-api/slim-phinx Version 0.1.*
slimphp-api/slim-mvc Version 0.1.*
slim/slim Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package slimphp-api/slim-api contains the following files

Loading the files please wait ....