@Jhansi Try to move {{ $users->links() }} after </table>
Btw it's DB::table('users')->paginate(10); with a minus p.
it is displaying at top as follows: « 1 2 » My code is: usercontroller.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\User;
class UserController extends Controller
{
public function index(){
$users = DB::table('users')->Paginate(10);
return view('index', ['users' => $users]);
}
}
index.blade.php
<html>
<Title> Users Registered</Title>
<body>
<table border="2" style= "background-color: #84ed86; color: #761a9b; margin: 0 auto;" >
<tr>
<th>Date</th>
<th>Project</th>
<th>TicketNumber</th>
<th>Ticketsubject</th>
<th>Timein</th>
<th>Timeout</th>
</tr>
@foreach ($users as $user)
<tr>
<td>{{ $user->Date }}</td>
<td>{{ $user->Project }}</td>
<td>{{ $user->TicketNumber }}</td>
<td>{{ $user->TicketSubject }}</td>
<td>{{ $user->Timein }}</td>
<td>{{ $user->Timeout }}</td>
</tr>
@endforeach
{{ $users->links() }}
</table>
</body>
</html>
@Jhansi Try to load Bootstrap for example from the cdn like
<!DOCTYPE html>
<html>
<head>
<title> Users Registered</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<table border="2" style= "background-color: #84ed86; color: #761a9b; margin: 0 auto;" >
<tr>
<th>Date</th>
<th>Project</th>
<th>TicketNumber</th>
<th>Ticketsubject</th>
<th>Timein</th>
<th>Timeout</th>
</tr>
@foreach ($users as $user)
<tr>
<td>{{ $user->Date }}</td>
<td>{{ $user->Project }}</td>
<td>{{ $user->TicketNumber }}</td>
<td>{{ $user->TicketSubject }}</td>
<td>{{ $user->Timein }}</td>
<td>{{ $user->Timeout }}</td>
</tr>
@endforeach
</table>
{{ $users->links() }}
</body>
</html>
Please or to participate in this conversation.