基础路由
laravel5.6路由位置
routes/web.php
Route::get('/', function () { return view('welcome'); });
Route是一个类
访问类的静态方法用 :: 形式
get方法可以传递2个参数
参数1:/
参数2:闭包函数
/ 表示首页
Route::get('article', function () { return view('welcome'); });
该路由访问:为www.xxx.com/article
函数直接定位在resources/views目录创建一个article.blade.php 文件
如果访问报错:则需要添加 www.xxx.com/index.php/article