mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-24 12:17:10 +00:00
24 lines
457 B
PHP
24 lines
457 B
PHP
<?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::where([['id', $id], ['userID', \Auth::id()]]);
|
|
return view('item', compact('item'));
|
|
}
|
|
}
|