PHP Laravel application that handles bookings. Live at https://bokning.datasektionen.se.
There will be an API for Pandora. The API will located at /api
(https://bokning.datasektionen.se/api).
When the API is implemented, there will exist some endpoints. The following endpoints are based on the above API URL. Note that these are not implemented yet.
GET /events/{entityId}/{year}/{week} Returns all events for the given week as JSON
APP_ENV=production
APP_KEY=12345678901234567890abcdefabcdef
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=
### ALT 1
DB_CONNECTION=
DB_HOST=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
### END ALT 1
### ALT 2
DB_CONNECTION=
DATABASE_URL:driver://user:password@host:port/database
### END ALT 2
LOGIN_API_KEY=[the key]
LOGIN_API_URL=https://login.datasektionen.se
LOGIN_FRONTEND_URL=https://login.datasektionen.se
PLS_API_URL=http://pls.froyo.datasektionen.se/api
ZFINGER_API_URL=https://zfinger.datasektionen.se
SPAM_API_KEY=[the key]
SPAM_API_URL=https://spam.datasektionen.se/api/sendmail
If you set up locally, DB_HOST
should likely be localhost
. If you set up with docker it should be set to mysql
.
The DB_CONNECTION
determines which type of database is used. Default is mysql
but allowed values are: sqlite
,
mysql
, pgsql
, and sqlsrv
.
Random features are implemented at a random speed. Post an issue, and maybe it will be implemented. One day.
This project is set up using Sail which uses Docker. To first install the project you
can run the following command to install sail
and all other dependencies.:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
Now sail
is available as a command as ./vendor/bin/sail
. If you want you can alias the command, like:
alias sail=./vendor/bin/sail
To run the project, including setting up a mysql
database based on .env
variables, run:
sail up
# Or to run in the background
sail up -d
# To stop you can use CTRL + C or if it running in the background:
sail stop
It should now be running on localhost:80
. If it is running for the first time you should start
by migrating the database (command listed below).
# Migrate Database
sail artisan migrate
# Run tests
sail test
# Generate APP_KEY
sail artisan key:generate
Keep in mind that from the Docker container's point of view: localhost
is the container itself, your local machine is
reachable at host.docker.internal
.
So, for example, if you have a local pls
instance on port 6000
to test for different permissions, the PLS_API_URL
can be set in .env
as:
PLS_API_URL=http://host.docker.internal:6000/api
You will need to have PHP and Composer installed. The Docker container uses PHP
version 8.1 but other versions could work. You should also set up a database, for example a mysql
database.
Then run:
# Install dependencies
composer install
# Generate APP_KEY
php artisan key:generate
# Migrate database
php artisan migrate
# Run tests
php artisan test
# Start server
php artisan serve
At least I think that is how it works, I haven't tested running it this way. Feel free to update this section or remove this comment if it actually does work this way.
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.
- Vehikl
- Tighten Co.
- Kirschbaum Development Group
- 64 Robots
- Cubet Techno Labs
- Cyber-Duck
- Many
- Webdock, Fast VPS Hosting
- DevSquad
- Curotec
- OP.GG
- CMS Max
- WebReinvent
- Lendio
- Romega Software
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [email protected]. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.