1. Go to this page and download the library: Download tohuma/laravel-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/ */
Route::get('welcome', function () {
return 'Welcome to my blog';
});
namespace App\Http\Controllers\Blog;
use App\Http\Controllers\Controller;
class BlogController extends Controller
{
public function comments()
{
return 'This is my list comments';
}
}