예제 #1
0
 /**
  * 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.');
     }
 }
예제 #2
0
파일: Test.php 프로젝트: gitfreengers/larus
 public function total()
 {
     $test = Test::all()->count();
     return $test;
 }