-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Halim
authored and
Halim
committed
Nov 10, 2016
1 parent
83936a5
commit 6237f0a
Showing
10 changed files
with
112 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use DB; | ||
use Yajra\Datatables\Facades\Datatables; | ||
use App\Article; | ||
|
||
class ArticlesDTController extends Controller { | ||
/* | ||
* | ||
*/ | ||
|
||
public function __construct() { | ||
$this->middleware('auth'); | ||
} | ||
|
||
/** | ||
* Display a listing of the resource. | ||
*/ | ||
public function index() { | ||
return view('datatables.index'); | ||
} | ||
|
||
/** | ||
* Process datatables ajax request. | ||
*/ | ||
public function getBasicData() { | ||
|
||
$articles = Article::select(['id', 'title', 'body', 'created_at', 'updated_at']); | ||
return Datatables::of($articles)->make(); | ||
|
||
//return Datatables::of(Article::query())->make(); | ||
} | ||
|
||
/** | ||
* Process datatables ajax request. | ||
*/ | ||
public function AddEditRemoveColumn() { | ||
|
||
$articles = Article::select(['id', 'title', 'body', 'created_at', 'updated_at']); | ||
|
||
return Datatables::of($articles)->addColumn('action', 'edit')->make(); | ||
|
||
//return Datatables::of(Article::query())->make(); | ||
} | ||
|
||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use App\DataTables\ArticlesDataTable; | ||
|
||
class ArticlesDTSController extends Controller { | ||
|
||
|
||
public function index(ArticlesDataTable $dataTable) { | ||
|
||
|
||
return $dataTable->render('datatables.index2'); | ||
|
||
|
||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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