TestRoleController.php 577 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Support\Facades\Route;
  5. class TestRoleController extends Controller
  6. {
  7. public function index()
  8. {
  9. $arr = [1,2,3,4];
  10. $arr1 = [1,2,3,4,5,6,7];
  11. return array_intersect($arr , $arr1) ? 1 : 2;
  12. }
  13. public function test()
  14. {
  15. return Route::getCurrentRoute()->uri;
  16. }
  17. public function testOne()
  18. {
  19. return Route::getCurrentRoute()->uri;
  20. }
  21. public function testTwo()
  22. {
  23. return Route::getCurrentRoute()->uri;
  24. }
  25. }