28 lines
581 B
PHP
28 lines
581 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Account;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Comment;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class CommentStatusController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$comments = Comment::with([
|
|
'flight.departureAirport.city',
|
|
'flight.arrivalAirport.city',
|
|
'tour',
|
|
])
|
|
->where('user_id', Auth::id())
|
|
->latest()
|
|
->paginate(10);
|
|
|
|
return view('account.comments', compact('comments'));
|
|
}
|
|
|
|
}
|
|
|