This README file provides an overview of the routes available in this Laravel application.
-
/profile
-
Description: User profile edit route.
-
Methods: GET, PATCH, DELETE
-
Middleware: auth
GET /api/notes
-
Description: Retrieve all notes for the authenticated user.
-
Middleware: auth:sanctum
-
-
POST /notes
- Description: Create a new note for the authenticated user.
- Request Body:
title
,body
- Middleware: auth:sanctum
-
GET /notes/{note}
- Description: Retrieve a specific note for the authenticated user.
- Middleware: auth:sanctum
-
PUT /notes/{note}
- Description: Update a specific note for the authenticated user.
- Request Body:
title
,body
- Middleware: auth:sanctum
-
DELETE /notes/{note}
- Description: Delete a specific note for the authenticated user.
- Middleware: auth:sanctum
-
POST /api/login
- Description: User login endpoint.
- Request Body:
email
,password
-
POST /api/register
- Description: User registration endpoint.
- Request Body:
name
,email
,password
-
GET /api/profile
- Description: Retrieve the authenticated user's profile information.
- Middleware: auth:sanctum
-
PATCH /api/profile
- Description: Update the authenticated user's profile information.
- Request Body:
name
,email
,password
- Middleware: auth:sanctum
-
GET /api/notes
- Description: Retrieve all notes for the authenticated user.
- Middleware: auth:sanctum
-
POST /api/notes
- Description: Create a new note for the authenticated user.
- Request Body:
title
,content
- Middleware: auth:sanctum
-
GET /api/notes/{note}
- Description: Retrieve a specific note for the authenticated user.
- Middleware: auth:sanctum
-
PUT /api/notes/{note}
- Description: Update a specific note for the authenticated user.
- Request Body:
title
,content
- Middleware: auth:sanctum
-
DELETE /api/notes/{note}
- Description: Delete a specific note for the authenticated user.
- Middleware: auth:sanctum
To set up this Laravel application locally, follow these steps:
- Clone the repository.
- Install dependencies with
composer install
. - Copy
.env.example
to.env
and configure your environment variables. - Generate application key with
php artisan key:generate
. - Run migrations and seed data with
php artisan migrate --seed
. - Serve the application with
php artisan serve
.