Skip to content

kurtounet/loc-car-api

Repository files navigation

Application de location de véhicules

1.Création du projet Symfony + installation des bundles

  1. Création du projet Symfony (fait):
symfony new loc-car-api --version=6.4
  1. Installation de doctrine symfony/orm-pack (fait)
composer require symfony/orm-pack
  1. Installation orm-fixtures (fait)
composer require --dev orm-fixtures

3.1 Installation symfony/asset (fait)

composer require symfony/asset
  1. Installation du MakerBundle (fait) :
composer require symfony/maker-bundle --dev
  1. Installation du profiler (fait) :
composer require --dev profiler
  1. Installer symfony/security-bundle (fait)
composer require symfony/security-bundle
  1. Installation API Platform (fait) :
composer require api-platform/core
  1. Installer Password-hasher Bundle (fait) :

https://symfony.com/doc/current/security/passwords.html

composer require symfony/password-hasher
  1. Installer JWT Authentication Bundle : https://api-platform.com/docs/core/jwt/
composer require lexik/jwt-authentication-bundle

lexik

Checks that the bundle is properly configured
symfony console lexik:jwt:check-config 
Generate public/private keys for use in your application
symfony console lexik:jwt:generate-keypair 
Generates a JWT token for a given user
symfony console lexik:jwt:generate-token
Installation de fakerphp/faker
composer require fakerphp/faker

2. Création de la base de données

symfony console doctrine:database:create

3 Création des entités

user + #[ApiResource()] (fait)

   symfony console make:user

vehicl + #[ApiResource()] (fait)

   symfony console make:entity vehicl

Rental + #[ApiResource()] (fait)

   symfony console make:entity Rental

Payment + #[ApiResource()] (fait)

   symfony console make:entity Payment

Agency + #[ApiResource()] (fait)

   symfony console make:entity Agency

VehicleAgency ManyToMany (a faire)

   symfony console make:entity VehicleAgency

Review (à voir)

4 Générer la migration

symfony console make:migration

5 Pour appliquer les migrations

symfony console doctrine:migrations:migrate

6. Création 1er Admin

Pour hasher le mot de passge du 1ère admin

symfony console security:hash-password 

security: 'is_granted("ROLE_USER")'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published