当前位置:网站首页>Laravel - view (new and output views)
Laravel - view (new and output views)
2022-07-05 13:54:00 【Weichi Begonia】
1. How to create a new view ?
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class MemberController extends Controller
{
public function info(Request $request, $id){
return view('member/info'); // The view file corresponds to resource/views/memeber Under the info.blade.php file
}
}
2. How to pass parameters to the view ? - stay view Use braces to get controller Parameters of transmission
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class MemberController extends Controller
{
public function info(Request $request, $id){
return view('member/info', [
'name'=>"tom",
"age"=>18,
]);
}
}
views Defined in the :info.blade.php
info-blade view
{
{$name}}
{
{$age}}边栏推荐
- UE源码阅读[1]---由问题入手UE中的延迟渲染
- 那些考研后才知道的事
- Convolutional Neural Networks简述
- web3.eth. Filter related
- redis6数据类型及操作总结
- How to deal with the Yellow Icon during the installation of wampserver
- leetcode 10. Regular expression matching regular expression matching (difficult)
- Jasypt configuration file encryption | quick start | actual combat
- Address book (linked list implementation)
- [server data recovery] a case of RAID5 data recovery stored in a brand of server
猜你喜欢

::ffff:192.168.31.101 是一个什么地址?

Can graduate students not learn English? As long as the score of postgraduate entrance examination English or CET-6 is high!

内网穿透工具 netapp

【华南理工大学】考研初试复试资料分享

法国学者:最优传输理论下对抗攻击可解释性探讨

Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications

PHP basic syntax

几款分布式数据库的对比

French scholars: the explicability of counter attack under optimal transmission theory

laravel-dompdf导出pdf,中文乱码问题解决
随机推荐
那些考研后才知道的事
Comparison of several distributed databases
In addition to the root directory, other routes of laravel + xampp are 404 solutions
Liste des liens (simple)
Requests + BS4 crawl Douban top250 movie information
Xampp configuring multiple items
Require, require in PHP_ once、include、include_ Detailed explanation of the efficiency of repeated introduction of once class library
[cloud resources] what software is good for cloud resource security management? Why?
When using Tencent cloud for the first time, you can only use webshell connection instead of SSH connection.
蓝桥杯学习2022.7.5(上午)
嵌入式软件架构设计-消息交互
Network security HSRP protocol
Simple PHP paging implementation
Resttemplate details
Log4j utilization correlation
Intranet penetration tool NetApp
Laravel generate entity
Elk enterprise log analysis system
Routing in laravel framework
Laravel框架运行报错:No application encryption key has been specified