Added billable and project_id to time entry endpoints; Enhanced api docs; Added pagination

This commit is contained in:
Constantin Graf
2024-03-19 17:19:12 +01:00
parent 7cc686f230
commit 2133eb0c16
22 changed files with 616 additions and 309 deletions

View File

@@ -27,16 +27,18 @@ class ProjectController extends Controller
/**
* Get projects
*
* @return ProjectCollection<ProjectResource>
*
* @throws AuthorizationException
*
* @operationId getProjects
*/
public function index(Organization $organization): JsonResource
public function index(Organization $organization): ProjectCollection
{
$this->checkPermission($organization, 'projects:view');
$projects = Project::query()
->whereBelongsTo($organization, 'organization')
->get();
->paginate();
return new ProjectCollection($projects);
}