HolgerHatGarKeineNode a3062f6c4e feat(api): authenticated course & course-event write endpoints
Implements Sanctum-authenticated write endpoints so a lecturer can create
and update their own courses and dated course events programmatically
(e.g. to keep the portal's course events in sync with an external system).

- CourseController@store / @update implemented (validation mirrors the
  Livewire course create form; create requires is_lecturer, update is
  restricted to the owner or a super-admin).
- New CourseEventController with index/store/update. index returns only the
  authenticated user's own events (optional ?course_id= filter) for
  idempotent syncing; validation mirrors the Livewire course event form.
- Public `courses` API resource narrowed to index/show; all writes moved
  behind an `auth:sanctum` route group (the previous store/update/destroy
  actions were empty no-ops).
- Pest feature test covering auth (401), authorization (403/is_lecturer/
  ownership), creation (201), validation (422) and ownership-scoped listing.

Ported from Einundzwanzig-Podcast/einundzwanzig-portal#25, adapted to this
repo's conventions (inline authorization instead of policies, Pest tests,
validation mirroring the current Livewire forms) while keeping the same
endpoint outputs.

Co-authored-by: schnuartz-ai <schnuartz@gmail.com>
2026-06-07 22:14:29 +02:00
2025-11-21 04:28:08 +01:00
2025-11-21 04:28:08 +01:00
2025-11-21 04:28:08 +01:00
2025-11-21 04:28:08 +01:00
2026-05-17 15:08:01 +02:00
2025-11-21 04:28:08 +01:00
2026-05-17 15:08:01 +02:00
2026-06-02 18:00:08 +02:00
2026-06-02 18:00:08 +02:00
2026-06-02 18:00:08 +02:00
2026-06-02 18:00:08 +02:00

Laravel Forge Site Deployment Status

Hosted:

Host your national domain?

To add your national domain, you need to create a CNAME record pointing to portal.einundzwanzig.space.

Here's how:

  1. Add a subdomain like portal.yourdomain.tld
  2. Create a CNAME record pointing to portal.einundzwanzig.space

DNS provider CNAME settings:

Type: CNAME Name/Host/Alias: portal Target/Value/Destination: portal.einundzwanzig.space

After setting up your CNAME, please notify the repository owner to refresh SSL certificates to include your domain.

Contributing and Proposals

https://gitworkshop.dev

Development

Prerequisites

  • PHP 8.3+
  • PostgreSQL (running locally or as a container)
  • Redis (running locally or as a container)
  • Node.js + Yarn

Installation

cp .env.example .env

composer install (you need a valid Flux Pro license or send a message to Nostr - The Ben)

Migrate and seed the database

php artisan migrate:fresh --seed

php artisan storage:link

Install node dependencies

yarn

Start development environment

composer run dev

This starts the PHP dev server, queue worker, Pail log viewer, and Vite concurrently.

Update dependencies

yarn

Security Vulnerabilities

If you discover a security vulnerability within this project, please go to https://gitworkshop.dev. All security vulnerabilities will be promptly addressed.

License

Open-sourced software licensed under the MIT license.

Languages
PHP 66.5%
Blade 32.6%
JavaScript 0.6%
CSS 0.3%