FiFreshChecker/app/Http/Controllers/HistoryController.php

21 lines
473 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use App\Models\Image;
class HistoryController extends Controller
{
public function index()
{
$histories = Image::with('classification')
->where('user_id', Auth::id())
->whereNotNull('user_id')
->whereHas('classification')
->latest()
->paginate(10);
return view('history.history', compact('histories'));
}
}