You can download the source code for this tutorial here: https://www.ericsdevblog.com/index.php/beginners-roadmap-to-web-development/ In Laravel, the routes are defined in the routes folder.
Go to routes/web.php, and we can see there is already a pre-defined route: use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); }); Enter fullscreen mode This piece of code means when the Laravel route receives "/", it returns a view called "welcome", which is located at resources/views/welcome.blade.php.
Route::match(['get', 'post'], '/', function () { // }); Route::any('/', function () { // }); Enter fullscreen mode #pass-data-to-view Pass Data to View