employee setup

This commit is contained in:
Ranjan 2024-04-10 11:40:07 +05:45
parent c019fcb02d
commit d92366b1f4
3 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,7 @@ class EmployeeRepository implements EmployeeInterface
{
public function findAll()
{
return Employee::get();
return Employee::paginate(20);
}
public function getEmployeeById($employeeId)
@ -23,7 +23,6 @@ class EmployeeRepository implements EmployeeInterface
public function create($employeeDetails)
{
// dd($employeeDetails);
return Employee::create($employeeDetails);
}

View File

@ -100,6 +100,13 @@
</div>
@endforeach
<div class="d-flex justify-content-end align-self-end">
<div class="mt-2 p-2">
{{ $employees->links() }}
</div>
</div>
</div>
</div>
</div>

View File

@ -2,6 +2,7 @@
namespace App\Providers;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@ -20,5 +21,7 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
//
Paginator::useBootstrap();
}
}