mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 07:50:54 -03:00
Including Item and Product migration, controllers and models
This commit is contained in:
23
app/Http/Controllers/ItemController.php
Normal file
23
app/Http/Controllers/ItemController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use \App\Item;
|
||||
|
||||
class ItemController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
//$item = Item::all();
|
||||
//return $item; //Show a JSON file instead of the view
|
||||
return view('item');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$item = Item::find($id);
|
||||
return view('item', compact('item'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user