Skip to content

Commit

Permalink
added readme file to expalin the api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdoulrachard committed Nov 12, 2024
1 parent 6a743ab commit 1c94c03
Showing 1 changed file with 189 additions and 45 deletions.
234 changes: 189 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,210 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>

<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
# Documentation de l'API et des Routes Web

## About Laravel
Ce document fournit une description complète des routes API et web disponibles pour cette application. Il détaille les opérations possibles et les paramètres nécessaires pour chaque route.

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](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
## Routes Web

Laravel is accessible, powerful, and provides tools required for large, robust applications.
### **GET /**

## Learning Laravel
Redirige vers la page d'accueil de l'application. Accessible uniquement pour les utilisateurs authentifiés.

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
### **Dashboard**

You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
#### **GET /dashboard**

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of 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.
Redirige vers le tableau de bord de l'utilisateur connecté. Accessible uniquement pour les utilisateurs authentifiés.

## Laravel Sponsors
#### **Ressources Dashboard**

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 Partners program](https://partners.laravel.com).
- **Actualité**
- `GET /dashboard/actuality`
- `POST /dashboard/actuality`
- `GET /dashboard/actuality/{id}`
- `PUT /dashboard/actuality/{id}`
- `DELETE /dashboard/actuality/{id}`

### Premium Partners
- **Catégories**
- `GET /dashboard/category`
- `POST /dashboard/category`
- `GET /dashboard/category/{id}`
- `PUT /dashboard/category/{id}`
- `DELETE /dashboard/category/{id}`

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
- **Projets**
- `GET /dashboard/project`
- `POST /dashboard/project`
- `GET /dashboard/project/{id}`
- `PUT /dashboard/project/{id}`
- `DELETE /dashboard/project/{id}`

## Contributing
- **Équipes**
- `GET /dashboard/equipe`
- `POST /dashboard/equipe`
- `GET /dashboard/equipe/{id}`
- `PUT /dashboard/equipe/{id}`
- `DELETE /dashboard/equipe/{id}`

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
### **Gestion du Profil Utilisateur**

## Code of Conduct
#### **GET /profile**

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
Affiche la page de profil de l'utilisateur authentifié.

## Security Vulnerabilities
#### **PATCH /profile**

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.
Met à jour les informations du profil de l'utilisateur connecté.

## License
#### **DELETE /profile**

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
Supprime le compte utilisateur.

---

## Routes API

Les routes API suivantes permettent de récupérer des informations sur les actualités, les équipes et les projets. Toutes les routes sont publiques sauf celles spécifiées avec un middleware d'authentification.

### **Actualités**

#### **GET /api/actuality**

Récupère la liste de toutes les actualités.

Réponse attendue :

```json
[
{
"id": 1,
"title": "Actualité 1",
"content": "Contenu de l'actualité"
},
...
]
```

#### **GET /api/actuality/{id}**

Récupère une actualité spécifique par son ID.

Réponse attendue :

```json
{
"id": 1,
"title": "Actualité 1",
"content": "Contenu de l'actualité"
}
```

### **Équipes**

#### **GET /api/equipe**

Récupère la liste de toutes les équipes.

Réponse attendue :

```json
[
{
"id": 1,
"name": "Équipe A",
"members": 10
},
...
]
```

#### **GET /api/equipe/{id}**

Récupère une équipe spécifique par son ID.

Réponse attendue :

```json
{
"id": 1,
"name": "Équipe A",
"members": 10
}
```

### **Projets**

#### **GET /api/project**

Récupère la liste de tous les projets.

Réponse attendue :

```json
[
{
"id": 1,
"name": "Projet A",
"description": "Description du projet"
},
...
]
```

#### **GET /api/project/{id}**

Récupère un projet spécifique par son ID.

Réponse attendue :

```json
{
"id": 1,
"name": "Projet A",
"description": "Description du projet"
}
```

---

## Authentification (API)

Les routes suivantes nécessitent une authentification via **Sanctum** pour récupérer les informations sur l'utilisateur connecté.

### **GET /api/user**

Récupère les informations de l'utilisateur connecté.

#### Réponse réussie :

```json
{
"id": 1,
"name": "Nom Utilisateur",
"email": "[email protected]"
}
```

---

## Erreurs

Les erreurs suivantes peuvent être retournées par l'API :

- **400 Bad Request** : Les données envoyées sont incorrectes ou manquantes.
- **401 Unauthorized** : L'utilisateur n'est pas authentifié pour accéder à cette ressource.
- **404 Not Found** : La ressource demandée n'a pas été trouvée.
- **500 Internal Server Error** : Une erreur interne s'est produite sur le serveur.

---

## Installation et Utilisation

1. Clonez le dépôt : `git clone <url_du_dépôt>`
2. Installez les dépendances : `composer install`
3. Créez votre fichier `.env` : `cp .env.example .env`
4. Générez votre clé d'application : `php artisan key:generate`
5. Lancez le serveur de développement : `php artisan serve`

---

0 comments on commit 1c94c03

Please sign in to comment.