mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 16:00:54 -03:00
Including authenticaed user on models: Items, Product and User
This commit is contained in:
@@ -42,7 +42,7 @@ class HomeController extends Controller
|
||||
public function index()
|
||||
{
|
||||
$users = [];
|
||||
$items = User::find(\Auth::id())->items()->with('users')->get();
|
||||
$items = User::loggedIn()->items()->with('users')->get();
|
||||
|
||||
foreach ($items as $item) {
|
||||
if ($item->used_by && !isset($users[$item->used_by])) {
|
||||
|
||||
Reference in New Issue
Block a user