This is a Contact Management System built with Laravel and Vue.js using Inertia.js. The system allows users to manage contacts, including creating, updating, deleting, and searching contacts. Additionally, the system supports sorting and pagination.
- PHP >= 8.0
- Composer
- Node.js & npm
- MySQL or any other supported database
-
Clone the repository:
git clone https://github.com/achrafbouhadou/HopTest.git cd HopTest
-
Install PHP dependencies:
composer install
-
Install JavaScript dependencies:
npm install
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Generate an application key:
php artisan key:generate
-
Set up your database credentials in the
.env
file:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database DB_USERNAME=your_username DB_PASSWORD=your_password
-
Run the database migrations:
php artisan migrate
-
(Optional) Seed the database with test data:
php artisan db:seed
-
Compile the assets:
npm run dev
-
Run the development server:
php artisan serve
-
Open your browser and navigate to:
http://localhost:8000
- Click the "+ Ajouter" button to open the contact creation form.
- Fill in the contact details.
- Click "Valider" to save the contact.
- Click the pencil icon next to a contact to open the contact editing form.
- Update the contact details.
- Click "Valider" to save the changes.
- Click the trash icon next to a contact.
- Confirm the deletion in the popup.
- Click the eye icon next to a contact to view the contact details in a read-only form.
- Use the search bar at the top to filter contacts by name or company.
- Click on the column headers ("Nom du contact", "Société", "Statut") to sort contacts by that column.
- Click again to toggle between ascending and descending order.