December 2016
Beginner
189 pages
3h 5m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Laravel, 10.1007/978-1-4842-2538-7_4
Sanjib Sinha1
(1)Howrah, West Bengal, India
Routing is the concept of setting up a new URI like http://localhost:8000/hello. It will take you to a destination web page. Laravel makes it extremely simple. It’s a static method that accepts two things: a URI and an anonymous function or Closure.
In the 'app/Http/routes.php' it’s been defined primarily. Start your favorite text editor and open the file. What you see?
You see some code like this:
Route::get('/', function () {return view('welcome');});
Here 'Route' is a class that has a static method ‘get’ that returns a ‘view’ method which presents a web page. When a user visits the home page ...
Read now
Unlock full access