mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-24 04:14:57 +00:00
Creating the very first routes and views - product and item
This commit is contained in:
parent
7a69f68ad0
commit
c706910d3a
@ -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