laravel 路由设置
目录 routes\web.php
初始路由,直接渲染视图welcome,即V层 '/'为路径:www.xxx.com/
Route::get('/', function () {
return view('welcome');
});
直接渲染视图welcome,即V层 'home'为路径:www.xxx.com/home
Route::get('/home',function(){
return view('welcome');
})
渲染视图层,并传递变量
Route::get('view','welcome',['name'=>'钧一']);
访问控制器 访问控制器WelcomeController里的index方法
Route::get('/','WelcomeController@index');
laravel 路由设置的更多相关文章
- laravel的路由设置,路由参数和路由命名(三)
laravel中必须先配置路由,才能使用.不像tp中不配置也能使用,因为tp可以通过pathinfo进行自动解析. 一.简单的路由设置 我们一般在routes/web.php文件中配置网页端路由. / ...
- laravel 增删改查 数据库设置 路由设置
laravel 框架的路由设置: url: http://www.shanzezhao.com/laraverl/my_laravel/public/index.php/indexs laravel ...
- 7月3日下午 微擎芸众商城 设计思路 - laravel路由底层源码解读
学习参考文章 https://learnku.com/articles/13622/the-principle-of-laravel-routing-execution <?phpnamespa ...
- 原来 laravel 路由 参数可以为可选。。。 很灵活
基本路由 您的应用程序的绝大多数路由将在 app/routes.php 文件中定义.Laravel 中最简单的路由由一个 URI 和一个闭包调用组成. 基本 GET 路由 复制代码代码如下: Rout ...
- laravel路由基础
基础: 所有的laravel路由都定义在 app/Http/routes.php 这个文件里,会被框架自带加载.简单的路由会接受一个URI和一个Closure类. Route::get('foo', ...
- Laravel timestamps 设置为unix时间戳
Laravel timestamps 设置为unix时间戳 class BaseModel extends Eloquent { /** * 默认使用时间戳戳功能 * * @var bool */ p ...
- ICBC中的路由设置
才去的中国工商银行,用身份证叫了A0076的号,前边还有26个人,闲来无聊果断拿出手机收取wifi.有两个ssid为ICBC的路由,信道分别是1号和6号,还好不需要密码,不过一会就连接上了. 那我先上 ...
- Controller里写自己需要的Action,参数的名字必须和路由设置的参数名一致
Controller里写自己需要的Action,参数的名字必须和路由设置的参数名一致,如果参数不一致,传过去为null
- xp多网卡静态路由设置方法
xp多网卡静态路由设置方法 一.多个IP都在同一网段或VALN.这类情况没什么好说的,在各块网卡的本地连接属性里设置好IP地址.子网掩码和默认网关即可. 二.多个IP属于不同网段或VLAN.这时如果按 ...
随机推荐
- Page (computer memory)
A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described ...
- appium(6)-parts of appium api
parts of appium api Lock Lock the screen.//锁屏. // java driver.lockScreen(3); // objective c [driver ...
- linux 网络设备,网卡配置 ,相关
网络设备,网卡配置: Eth0是物理网卡:唯一mac地址,Bcast:广播地址,MAsk:子网掩码, Lo:系统自带的回环的ip地址,可以做一些基本的测试应用,比如没有网卡就用127.0.0.1, r ...
- leetcode 747. Largest Number At Least Twice of Others
In a given integer array nums, there is always exactly one largest element. Find whether the largest ...
- SCAU 还有两个东西 —— 异或
竞赛题 F 还有两个东西 Time Limit:400MS Memory Limit:65535K 题型: 编程题 语言: 无限制 描述 给出n( n >= 2 )个整数,其中有 2 个 ...
- java版的下雪,大家圣诞快乐
1. [代码][Java]代码 package com.yk.tools.game; import java.applet.AudioClip;import java.awt.Dimension ...
- BestCoder3 1001 Task schedule(hdu 4907) 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4907 题目意思:给出工作表上的 n 个任务,第 i 个任务需要 ti 这么长的时间(持续时间是ti ~ ...
- github如何提交自己修改的代码
当在github上发现别人项目有BUG,或者想要完善其功能的时候,该如何把自己的修改提交到项目中呢? 以logback为例 步骤: 1, fork一份logback代码到自己的仓库 进入github要 ...
- hdu-5670 Machine(水题附上java代码)
题目链接: Machine Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描 ...
- CodeForces960F:Pathwalks (主席树+DP)
You are given a directed graph with n nodes and m edges, with all edges having a certain weight. The ...