Your First Application
[
28
]
Now, we can create the route for the URL we're redirecting to:
Route::get('cats', function() {
return 'All cats';
});
Returning views
The most frequent object that you will return from your routes is the
View
object. Views
receive data from a route (or controller action) and inject it into a template, therefore
helping you to separate the business and presentation logic in your application.
To add your first view, simply create a file called
about.php
at
resources/views
and add the following content to it:
Do'stlaringiz bilan baham: