That may be an issue with the nginx configuration, check the site configuration looks like the following, it has helped me in the past:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a simple logging system that logs information about when a user did things (added a reservation, edit, delete etc).
Logs as you can imagine get a bit large, so I decided to paginate my data and this works fine on my local development environment (Windows with XAMPP) but not in my production environment (Ubuntu 14.04 with Nginx web server).
My Controller:
public function logs()
{
$logs = Logs::orderBy('created_at', 'DESC')->paginate(25);
$logs->setPath('');
return view('admin.logs', compact('logs'));
}
my view:
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th>Log ID</th>
<th>User</th>
<th>Action</th>
<th>Description</th>
<th>When</th>
</tr>
</thead>
<tbody>
@foreach($logs as $log)
<tr>
<td>{{$log->id}}</td>
<td>{{$log->user->name }}</td>
<td>{{$log->action }}</td>
<td>{{$log->description}}</td>
<td>{{$log->created_at}}</td>
</tr>
@endforeach
</tbody>
</table>
{!! $logs->render() !!}
</div>
Everything renders correctly, pagination even shows the number of pages I'd need for my production environment logs but when clicking the numbers or next the page changes and the url changes but the data is exactly the same in production but changes in my development environment.
That may be an issue with the nginx configuration, check the site configuration looks like the following, it has helped me in the past:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
Please or to participate in this conversation.