Creating the very first routes and views - product and item

This commit is contained in:
2018-09-08 12:38:01 -03:00
parent 04869e3050
commit 0eac52c440
2 changed files with 12 additions and 1 deletions

View File

@@ -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');
});