This is a simple CRUD (Create, Read, Update, Delete) application built with Laravel 11, jQuery - Ajax, SweetAlert, and DataTable. It allows users to perform CRUD operations on a database table and upload images for each item.
- CRUD Operations: Create, Read, Update, and Delete records.
- Image Upload: Upload images for each item.
- Dynamic Loading: Data loaded dynamically using jQuery Ajax.
- User-Friendly Alerts: Beautiful alert messages using SweetAlert.
- Data Presentation: Use DataTable for data presentation and manipulation.
- PHP: >= 8.2
- Composer
- Laravel 11
- SQLite database
- Web Server: (Apache, Nginx, etc.)
-
Clone the repository:
git clone https://github.com/ishado/crud-ajax.git
-
Navigate to the project directory:
cd project-directory
-
Install composer dependencies:
composer install
-
Copy
.env.example
to.env
and configure your database credentials:cp .env.example .env
-
Update the following lines in
.env
file to use SQLite:DB_CONNECTION=sqlite # DB_HOST=127.0.0.1 # DB_PORT=3306 # DB_DATABASE=laravel # DB_USERNAME=root # DB_PASSWORD=
-
Create an empty SQLite database file:
touch database/database.sqlite
-
Run database migrations to create required tables:
php artisan migrate
-
Serve the application:
php artisan serve
-
Access the application in your web browser at
http://localhost:8000
.
- Navigate to the application in your web browser.
- Perform CRUD operations using the provided interface.
- Upload images for each item.
- Enjoy the smooth interaction and beautiful interface provided by SweetAlert and DataTable.
- Laravel - https://laravel.com/
- jQuery - https://jquery.com/
- SweetAlert - https://sweetalert2.github.io/
- DataTable - https://datatables.net/
Check out the source tutorial here. This project is open-source software licensed under the MIT license.