| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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 view("home");
- }
- return redirect(url('rejected/index/general'));
- }
- public function home()
- {
- return view('home');
- }
- public function help()
- {
- $filePath = base_path('文档/SystemHandBook.md');
- $read = @file_get_contents($filePath);
- $read = str_replace(["\r","\n",'"'],["\\r",'\\n',"'"],$read);
- return view("help",compact("read"));
- }
- }
|