mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-27 21:31:27 +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">
|
<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