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
04869e3050
commit
0eac52c440
@ -80,6 +80,7 @@
|
|||||||
<div class="title m-b-md">
|
<div class="title m-b-md">
|
||||||
Share It!
|
Share It!
|
||||||
</div>
|
</div>
|
||||||
|
<div>Hello, {{$name}}!</div>
|
||||||
|
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a href="https://laravel.com/docs">Documentation</a>
|
<a href="https://laravel.com/docs">Documentation</a>
|
||||||
|
@ -12,5 +12,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Route::get('/', function () {
|
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