This repository contains code for importing and managing XML data in a database using Laravel.
- Clone the repository:
git clone https://github.com/DelvinNJ/xml-db-import.gitcd xml-db-import- Install dependencies using Composer:
composer install- Copy the environment file and generate application key:
cp .env.example .envphp artisan key:generate- Configure the database in .env file.
- Create the SQLite database file:
touch database/db.sqliteRun database migrations to set up the database schema:
php artisan migrateTo run the unit tests:
php artisan testTo store XML data into the database from a file:
php artisan store-xml-data "file_name"Replace "file_name" with the actual path of your XML file.
php artisan store-xml-data "file_name"To update XML data from a file:
php artisan update-xml-data "file_name"Replace "file_name" with the actual path of your XML file.
php artisan update-xml-data feed.xmlLogs for XML operations are stored in:
storage/logs/xml_operation.logTo view logs, start the Laravel development server:
php artisan serveThen, navigate to the following URL in your web browser:
http://127.0.0.1:8000/log-viewerContact If you have any questions or feedback, feel free to reach out:
Email: delvinnj02@gmail.com
Happy coding!