An open API service indexing awesome lists of open source software.

https://github.com/aadhar41/laravel-datatable

The repository contain laravel framework with integrated datatable ( yajra-datatable ) & it uses database custom seeder to seed/insert data into table. i have used a custom database seeder (UserSeeder) to seed data into user table & i have also used faker library for seeding fake data in table. This is just a basic example how you can use yajara-datatable & You can create Your own table seeder to insert fake/dummy data in table.
https://github.com/aadhar41/laravel-datatable

database-custom-seeder faker-library laravel laravel-datatable laravel-framework seed-data yajra-datatable

Last synced: 4 months ago
JSON representation

The repository contain laravel framework with integrated datatable ( yajra-datatable ) & it uses database custom seeder to seed/insert data into table. i have used a custom database seeder (UserSeeder) to seed data into user table & i have also used faker library for seeding fake data in table. This is just a basic example how you can use yajara-datatable & You can create Your own table seeder to insert fake/dummy data in table.

Awesome Lists containing this project

README

          

## Laravel yajra datatable installation
https://github.com/yajra/laravel-datatables { This for installation }

https://datatables.yajrabox.com/starter { This for controller setup & css & js file }

## Laravel css & js assets for blade template

![Datatable Method](https://github.com/aadhar41/laravel-datatable/blob/master/001-datatable-assets.png)

## Laravel controller
use Yajra\Datatables\Datatables;

## Laravel controller method

![Datatable Method](https://github.com/aadhar41/laravel-datatable/blob/master/001-datatable-controller-method.png)

## Laravel collective installation
https://laravelcollective.com/docs/6.0/html#installation

## Laravel faker library
https://github.com/fzaninotto/Faker

I have user custom seeder (UserSeeder) to insert/seed data into database.
## Laravel seeder command
https://laravel.com/docs/7.x/seeding
php artisan db:seed ( default command execute DatabaseSeeder )

php artisan db:seed --class=UserSeeder ( command execute UserSeeder )

## Laravel Added Cron/command Function (Laravel Cronjob Scheduling Example)
Referense :
https://appdividend.com/2018/03/01/laravel-cronjob-scheduling-tutorial/

## Laravel api module & Soft Delete method
Reference :
https://medium.com/@chrissoemma/laravel-5-8-delete-and-soft-delete-practical-examples-b9b71c0a97f

Api Endpoints postman :
[POST] http://localhost/blog/api/v1/notes
[GET] http://localhost/blog/api/v1/notes
[DELETE] http://localhost/blog/api/v1/notes/4
[DELETE] http://localhost/blog/api/v2/notes/2
[GET] http://localhost/blog/api/v2/notes/withsoftdelete
[GET] http://localhost/blog/api/v2/notes/softdeleted
[PATCH] http://localhost/blog/api/v1/notes/3
[DELETE] http://localhost/blog/api/v3/notes/2

Creating new migration for alteration of table :
php artisan make:migration add_votes_to_users_table --table=users