This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import DataTable from "./DataTable"; | |
| const App = () => { | |
| return ( | |
| <div className="card"> | |
| <div className="card-header">Users</div> | |
| <div className="card-body"> | |
| <DataTable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from "react"; | |
| export interface IUser { | |
| name: string; | |
| age: number; | |
| } | |
| const App = () => { | |
| const [users, setUsers] = useState<IUser[]>([ | |
| { | |
| name: "Bijaya", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <nav v-if="pagination"> | |
| <ul class="pagination"> | |
| <li class="page-item" :class="{'disabled' : pagination.currentPage === 1}"> | |
| <a class="page-link" href="#" @click.prevent="changePage(pagination.currentPage - 1)">Previous</a> | |
| </li> | |
| <li v-for="page in pagesNumber" class="page-item" | |
| :class="{'active': page == pagination.current_page}"> | |
| <a href="javascript:void(0)" @click.prevent="changePage(page)" class="page-link">{{ page }}</a> | |
| </li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $finder = (new PhpCsFixer\Finder()) | |
| ->in(__DIR__) | |
| ->name('*.php') | |
| ->notName('_ide_helper.php') | |
| ->notName('*.blade.php') | |
| ->notPath('bootstrap') | |
| ->notPath('node_modules') | |
| ->notPath('storage') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="data-table"> | |
| <div class="main-table"> | |
| <table class="table"> | |
| <thead> | |
| <tr> | |
| <th class="table-head">#</th> | |
| <th v-for="column in columns" :key="column" @click="sortByColumn(column)" | |
| class="table-head"> | |
| {{ column | columnHead }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use App\Http\Resources\UsersResource; | |
| use App\User; | |
| use Illuminate\Http\Request; | |
| /** | |
| * Class UsersController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="csrf-token" content="{{ csrf_token() }}"> | |
| <title>Laravel</title> | |
| <link rel="stylesheet" href="{{ asset('css/app.css') }}"/> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('./bootstrap') | |
| import Vue from 'vue' | |
| window.Vue = Vue | |
| import DataTable from './components/DataTable' | |
| const app = new Vue({ | |
| el: '#app', | |
| components: { | |
| DataTable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="data-table"> | |
| <table class="table"> | |
| <thead> | |
| <tr> | |
| <th class="table-head">#</th> | |
| <th v-for="column in columns" :key="column" | |
| class="table-head"> | |
| {{ column | columnHead }} | |
| </th> |
NewerOlder