| |

PHP Advanced Datatable in Laravel >= 5.0


Why use PHP Advanced Datatable?

By using "PHP Advanced DataTable /PHPDT/" you can create fantastic management pages with ajax requests, you can add a lot of filters types such as: text, select, autocomplete and tag, and build a lot of ajax actions such as: adding, editing and deleting, you can use these actions as bulk or single, all actions and filters works by ajax requests so, no need to reload your page. In addition, it is very easy to build your datatable , filters and actions

IDUsernameFirstnameLastnameActions

What are the features?

Free Pro
Install by composer
$ composer require phpdt/ldt
Download from envato
$0.00
$10.00
Seperate business from personal spending
Custom Columns
  Custom Columns
Custom Render To Column
  Custom Render To Column
Text Filter
  Text Filter
"Select" filter
  "Select" filter
Autocomplete Filter
  Autocomplete Filter
Tag Filter
  Tag Filter
Link Action
  Link Action
Ajax Action
  Ajax Action
Bulk Action
  Bulk Action


How to use?

  • Create your controller.
  • Create your datatable extend from "\Phpdt\Ldt\Datatable" as shown below.
  • Use your datatable in your controller by create an object form this class and define what you need columns.
  • create your blade template and put the following code: "@include('phpdt::datatable_view') @section('datatable_section') @parent @show " where you want the datatable appears.
  • Define your filters (optinal) (text, select, autocomplete and tag) by call addfilter from datatable object that was created.
  • Build your actions as shown in our website (bulk or single) (adding, editing, deleting and links) and call it by "addaction" from datatable object that was created.

  • Create simple your datatable class:
    • create new class name "Test" for example then put the following code:
          class Test extends \Phpdt\Ldt\Datatable
          {
              const PRIMARY = 'primary key in your table';
      
              static function from(){
                      return 'your table in your database';
              }
          }
      
  • Create advanced datatable:
    • Create your datatable class "Test" for example
    • Create actions
      create new class "Edit" for example then put the following code:
      
          class Edit extends \Phpdt\Ldt\Actions
          {
              //Optional
              var $formview = 'form view (blade template)';
      
          }
                      
    • Create filters
       
  • How to call all this?
    in the action of your controller put the following code:
    
        $dt = new Your/Datatable/Class(
               //Columns
                array(
                    'firstname' => 'Firstname',
                    'lastname' => 'Lastname'
                ));
        return $dt->display('Your/Blade/Template',$request);
    
    

    in your blade template where you want your datatable appears put the following code:
    	@include('phpdt::datatable_view')
    	@section('datatable_section')
    		@parent
    	@show
            

By: Mohammad Alaa Aldeen
Git: https://github.com/mhdalaaaldeen