1. Go to this page and download the library: Download dezsidog/laravel-change-way 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/ */
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class V1Controller extends Controller
{
public function test()
{
return 'v1';
}
}
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class V2Controller extends Controller
{
public function test()
{
return 'v2';
}
public function test2()
{
return 'v2';
}
}