PHP Classes

File: src/Routes/index.php

Recommend this page to a friend!
  Classes of NN   Laravel World   src/Routes/index.php   Download  
File: src/Routes/index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel World
Get data specific to world locations
Author: By
Last change:
Date: 2 years ago
Size: 2,181 bytes
 

Contents

Class file image Download
<?php

use Illuminate\Support\Facades\Route;
use
Nnjeim\World\Http\Controllers;

Route::group([
   
'prefix' => '{prefix?}',
   
'middleware' => [
       
'throttle:60,1',
       
'locale.set',
       
'bindings',
    ],
], function () {
   
/*-- Countries ---------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'countries',
       
'as' => 'countries',
    ], function () {
       
Route::get('/', [Controllers\Country\CountryController::class, 'index'])->name('index');
    });
   
/*-- States ------------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'states',
       
'as' => 'states',
    ], function () {
       
Route::get('/', [Controllers\State\StateController::class, 'index'])->name('index');
    });
   
/*-- Cities ------------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'cities',
       
'as' => 'cities',
    ], function () {
       
Route::get('/', [Controllers\City\CityController::class, 'index'])->name('index');
    });
   
/*-- Timezones ---------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'timezones',
       
'as' => 'timezones',
    ], function () {
       
Route::get('/', [Controllers\Timezone\TimezoneController::class, 'index'])->name('index');
    });
   
/*-- Currencies --------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'currencies',
       
'as' => 'currencies',
    ], function () {
       
Route::get('/', [Controllers\Currency\CurrencyController::class, 'index'])->name('index');
    });
   
/*-- Phones ------------------------------------------------------------------------------------------------------*/
   
Route::group([
       
'prefix' => 'phones',
       
'as' => 'phones',
    ], function () {
       
Route::post('/validate', [Controllers\Phone\PhoneController::class, 'validate'])->name('validate');
       
Route::post('/format', [Controllers\Phone\PhoneController::class, 'format'])->name('format');
       
Route::post('/strip', [Controllers\Phone\PhoneController::class, 'strip'])->name('strip');
    });
});