/** * Display a listing of the resource. * @return view('package::view.name'); * @return Response */ public function index() { // if (Sentinel::hasAccess('test.view')) { $tests = Test::all(); return view('PackageTest::test.index', compact('tests')); } else { return back()->withErrors('You are not permitted to access this area.'); } }
public function total() { $test = Test::all()->count(); return $test; }