Skip to content

Instantly share code, notes, and snippets.

@anlisha-maharjan
Created January 25, 2022 05:02
Show Gist options
  • Save anlisha-maharjan/f7cd1cd8701bd4c4bf9e9966423716dd to your computer and use it in GitHub Desktop.
Save anlisha-maharjan/f7cd1cd8701bd4c4bf9e9966423716dd to your computer and use it in GitHub Desktop.
<?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