PHP Classes

File: config/routes.php

Recommend this page to a friend!
  Classes of Till Wehowski   PHP Assets Management   config/routes.php   Download  
File: config/routes.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Assets Management
Framework controller to serve static files
Author: By
Last change:
Date: 4 years ago
Size: 483 bytes
 

Contents

Class file image Download
<?php
use function DI\add;
//'GET|POST|PUT|DELETE|OPTIONS', '/bar/[:controller]/[:action].[:type]?', 'bar_action', 'bar_route'

 
$preferences = json_decode(file_get_contents(__DIR__ .\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'preferences.json'));

 

return [

   
  
'routes' => add([
                  [
'GET', $preferences->routes->assets->route, [\frdl\WebAssets\WebAssetsController::class, 'serve'], $preferences->routes->assets->name],
                
   
         ]),
       
];