PHP code example of nasution / laravel-implicit-routes

1. Go to this page and download the library: Download nasution/laravel-implicit-routes 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/ */

    

nasution / laravel-implicit-routes example snippets


Nasution\ImplicitRoutes\ServiceProvider::class,

Route::anything();

Route::get('/', 'HomeController@welcome');

Route::any('products/shoes/{param0}', 'ProductsController@shoes');

class ProductsContoller extends Controller
{
    public function shoes($id)
    {
        return $id; // 42
    }
}

Route::any('products', 'ProductsController@index');

class ProductsContoller extends Controller
{
    public function index()
    {
        //
    }
}