PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of Ahmed Khan   Todo App with Lumen   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Todo App with Lumen
Manage list of tasks that users need to do
Author: By
Last change:
Date: 2 months ago
Size: 833 bytes
 

Contents

Class file image Download
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$app->get('/', function () use ($app) {
    return
$app->version();
});
$app->group(['prefix' => 'api/'], function ($app) {
   
$app->get('login/','UsersController@authenticate');
   
$app->post('todo/','TodoController@store');
   
$app->get('todo/', 'TodoController@index');
   
$app->get('todo/{id}/', 'TodoController@show');
   
$app->put('todo/{id}/', 'TodoController@update');
   
$app->delete('todo/{id}/', 'TodoController@destroy');
});