leonardocnalves / slim-skeleton-mvc

Skeleton mvc Slim Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slim Framework

Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs.

Installation

It's recommended that you use Composer to install Slim.

$ composer install

This will install Slim and all required dependencies. Slim requires PHP 5.5.0 or newer.

Usage

Create an index.php file with the following contents:

<?php

require 'vendor/autoload.php';

$app = new Slim\App();

$app->get('/hello/{name}', function ($request, $response, $args) {
    return $response->write("Hello, " . $args['name']);
});

$app->run();

You may quickly test this using the built-in PHP server:

$ php -S localhost:8000

Going to http://localhost:8000/hello/world will now display "Hello, world".

For more information on how to configure your web server, see the Documentation.

About

Skeleton mvc Slim Framework


Languages

Language:PHP 97.6%Language:ApacheConf 2.4%