PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of Ujah Chigozie peter   Luminova REST API Example   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Luminova REST API Example
Implements an example of a REST API
Author: By
Last change:
Date: 14 days ago
Size: 615 bytes
 

Contents

Class file image Download
<?php
/**
 * Handles all URI prefixes except for `api` (e.g., https://example.com/).
 * This file defines the routes that are not under the `/api` prefix.
 *
 * The following global variables are available in the current file:
 *
 * @var \Luminova\Routing\Router $router The routing instance.
 * @var \App\Application $app The application instance that provides access to the overall application context.
 * @var string $context The name of the current routing context (this file's context).
 */

$router->get('/', 'Welcome::home');
$router->get('/cdn/([a-zA-Z0-9_-]+\.(jpg|jpeg|png|webp)+)', 'Welcome::imageCdn');