1. Go to this page and download the library: Download scorninpc/slim-mvc-skel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scorninpc / slim-mvc-skel example snippets
'test' => [ // Name of route
'pattern' => "/hello[/{somevar}]", // URL
'type' => ['GET'], // Type
'defaults' => [
'module' => "main", // Controller
'controller' => "index", // Controller
'action' => "hello", // Action
'somevar' => 1 // Some parameter, default if not passed on url
],
],
namespace Application\Main\Controllers;
class productsController extends \Slim\Mvc\Controller
{
public function detailsAction()
{
}
}
'test' => [ // Name of route
'pattern' => "/hello[/{somevar}]", // URL
'type' => ['GET'], // Type
'defaults' => [
//'module' => "main", // Module
'controller' => "index", // Controller
'action' => "hello", // Action
'somevar' => 1 // Some parameter, default if not passed on url
],
],