| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Gate;
- class HomeController extends Controller
- {
- /**
- * Create a new controller instance.
- *
- * @return void
- */
- public function __construct()
- {
- $this->middleware('auth');
- }
- /**
- * Show the application dashboard.
- *
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function index()
- {
- if(!Gate::allows('退货管理-查询')){
- if(!Gate::allows('运输管理-查询')){ return view('home');}
- return redirect(url('waybill'));
- }
- return redirect(url('rejected/index/general'));
- }
- public function home()
- {
- return view('home');
- }
- }
|