Created
January 25, 2022 05:02
-
-
Save anlisha-maharjan/f7cd1cd8701bd4c4bf9e9966423716dd to your computer and use it in GitHub Desktop.
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 Illuminate\Http\Request; | |
use App\DataTables\UserDataTable; | |
use App\DataTables\NoticeDataTable; | |
use Response; | |
class DashboardController extends Controller | |
{ | |
/** | |
* Create a new controller instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
} | |
/** | |
* Display a listing of the User and Notice. | |
* | |
* @param UserDataTable $userDataTable | |
* @param NoticeDataTable $noticeDataTable | |
* @return Response | |
*/ | |
public function index(UserDataTable $userDataTable, NoticeDataTable $noticeDataTable) | |
{ | |
return view('dashboard.index', [ | |
'userDataTable' => $userDataTable->html(), | |
'noticeDataTable' => $noticeDataTable->html() | |
]); | |
} | |
public function getUser(UserDataTable $userDataTable) | |
{ | |
return $userDataTable->render('dashboard.index'); | |
} | |
public function getNotice(NoticeDataTable $noticeDataTable) | |
{ | |
return $noticeDataTable->render('dashboard.index'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment