mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
Creating the very first routes and views - product and item
This commit is contained in:
parent
04869e3050
commit
0eac52c440
@ -80,6 +80,7 @@
|
||||
<div class="title m-b-md">
|
||||
Share It!
|
||||
</div>
|
||||
<div>Hello, {{$name}}!</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://laravel.com/docs">Documentation</a>
|
||||
|
@ -12,5 +12,15 @@
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
$name = 'Bruno';
|
||||
return view('welcome', compact('name'));
|
||||
});
|
||||
|
||||
Route::get('/product/{id}', function () {
|
||||
$productID = DB::table('product')->find($id);
|
||||
return view('product', compact['productID']);
|
||||
});
|
||||
|
||||
Route::get('/item/{id}', function () {
|
||||
return view('item');
|
||||
});
|
Loading…
Reference in New Issue
Block a user