Skip to content

Instantly share code, notes, and snippets.

View gabbydgab's full-sized avatar
🏠
Working from home

Gab Amba gabbydgab

🏠
Working from home
View GitHub Profile
@gabbydgab
gabbydgab / vue-datatable.md
Created September 11, 2020 10:47 — forked from plmrlnsnts/vue-datatable.md
Datatable component for Vue and Tailwind CSS

Keep in mind that this implementation requires an api for fetching data, and assumes the following response schema:

{
    "perPageOptions": [
        15, 50, 100
    ],
    "actions": [
        "Delete all", "Publish All", "Unpublish All"
    ],
@gabbydgab
gabbydgab / controller.php
Created July 14, 2018 02:31
Example DataTables
<?php
namespace App\Http\Controllers\Office\Employee;
use App\Http\Resources\Office\Employee\EmployeeCollection;
use App\Http\Resources\Office\Employee\Employee as EmployeeResource;
use App\Models\User\User as Employee;
use App\Http\Controllers\Controller;
use Yajra\DataTables\DataTables;
use Illuminate\Database\Eloquent\Collection;
@gabbydgab
gabbydgab / routing.php
Created September 2, 2017 13:12
Route Model Binding in Laravel Package
<?php
/**
* Following binding works!
*/
namespace MyPackage\Model;
class User
{
}