Install Laravel Passport:
composer require laravel/passport
The Verwaltungssystem requires access to a MySQL database and an LDAP instance. For development, you can start them via Docker:
# Start containers
docker compose -f docker-compose-dev.yaml up -d
# Stop containers
docker compose -f docker-compose-dev.yaml down
Some database data is encrypted to ensure privacy. Generate a new encryption key locally:
php artisan key:custom
php artisan key:generate
# Clear caches
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
Warning: Only do this in a production environment with extreme caution.
Before logging in, the database and LDAP must be prepared. This step may need to be repeated when peripheral services are restarted.
# Import LDAP data
ldapadd -D cn=admin,dc=newman-net,dc=de -w ldap_passwd -f aktiveBewohner.ldif
ldapadd -D cn=admin,dc=newman-net,dc=de -w ldap_passwd -f alleBewohner.ldif
# Reset and initialize database
php artisan db:reset
Run the following commands in two separate terminal sessions:
php artisan serve
npm run dev
Generate artificial data for development:
php artisan db:seed --class=FakingDatabaseSeeder
Path | Description |
---|---|
/routes/web |
HTTP endpoints for web requests |
/routes/api |
HTTP endpoints for API requests |
/app/Console |
Console commands (can be scheduled) |
/app/Http |
Controllers, Middleware, Requests |
/app/Ldap |
LDAP contact synchronization |
/app/Models |
Eloquent model classes |
/app/Policies |
Model access policies |
/app/Util |
Utility classes (e.g., PDF generation) |
/database/migrations |
Database table definitions |
/database/seeders |
Seeders for test or imported data |
/lang |
Translation files |
resources/js |
Frontend Vue.js code |
resources/js/Pages |
Pages rendered via Inertia.js |
Command | Description |
---|---|
key:custom |
Create a custom database encryption key. Re-encrypts all data if a previous key exists. |
db:reset |
Reset the database and LDAP. |
ldap:active |
Updates active inhabitants in LDAP (scheduled daily). |
radius:active |
Disables network accounts of recently moved-out inhabitants (scheduled daily). |
radius:users |
Re-generates the users file and restarts the authentication server after important changes. |
Laravel is a web framework with expressive syntax that simplifies development tasks, including:
- Fast and simple routing
- Dependency injection container
- Multiple back-ends for session and cache storage
- ORM (Eloquent) for database management
- Database agnostic migrations
- Background job processing (queues)
- Real-time event broadcasting (broadcasting)
Comprehensive documentation and video tutorials make it easy to get started.
When updating Laravel:
- Check the Laravel upgrade guide for the target version.
- Update the packages in
composer.json
to match the upgrade requirements. - Follow the guide to complete the update.