- Ctype PHP Extension (enabled by default: https://www.php.net/manual/en/ctype.installation.php)
- cURL PHP Extension (
extension=curl: https://www.php.net/manual/en/curl.installation.php) - DOM PHP Extension (enabled by default: https://www.php.net/manual/en/dom.installation.php)
- Fileinfo PHP Extension (
extension=fileinfosuppousedly enabled by default: https://www.php.net/manual/en/fileinfo.installation.php) - Filter PHP (enabled by default: https://www.php.net/manual/en/filter.installation.php)
- Hash PHP Extension (core PHP extension, always enabled: https://www.php.net/manual/en/hash.installation.php)
- Mbstring PHP Extension (enable on php install: https://www.php.net/manual/en/mbstring.installation.php)
- OpenSSL PHP Extension (enable on php install: https://www.php.net/manual/en/openssl.installation.php)
- PCRE PHP Extension (core PHP extension, always enabled: https://www.php.net/manual/en/pcre.installation.php)
- PDO PHP Extension (configure on php install: https://www.php.net/manual/en/pdo.installation.php)
- Session PHP Extension (enabled by default: https://www.php.net/manual/en/session.installation.php)
- Tokenizer PHP Extension (enabled by default: https://www.php.net/manual/en/tokenizer.installation.php)
- XML PHP Extension (enabled by default: https://www.php.net/manual/en/xml.installation.php)
enable curl & fileinfo PHP extensions in php.ini file
extension=curl
extension=fileinfo
source: https://laravel.com/docs/11.x/deployment#server-requirements
Copy and customize repository .env.example as .env.
composer install
php artisan key:generate
Adds generated key to .env file.
php artisan migrate
php artisan db:seed
Seeds user with the .env (USER_*) data
GET/(sanctum authenticated)POST/auth/login{ "email": "user@conwork.io", "password": "password" }GET/auth/logout(sanctum authenticated)
GET/docsGET/docs.json
/insomina-document.json file also available.
Props:
title: string (255)article: text
Relations:
Article->author()User->articles()
Article input validation:
title: required && max-length: 255article: required
Routes:
- List articles:
GET/articles - Create article (author is the authenticated-request-user):
POST/articles - Show article:
GET/articles/{article} - Update article (optional: authorize only if author is the authenticated-request-user):
PUT | PATCH/articles/{article} - Delete article (optional: authorize only if author is the authenticated-request-user):
DELETE /articles/{article}
Get preferences from authenticated request user ($user->preferences), check for locale preference and change app lang / locale correspondingly.
config('app.available_locales') contains the application available languages: ['en', 'es']
Prepared translations for Article routes responses can be found under:
/lang/en/article.php | /lang/es/article.php:article.index.successarticle.store.successarticle.show.successarticle.update.successarticle.delete.success
Delete all User personal access tokens for the given --user_id.