当前位置:网站首页>Laravel subdomain accesses different routing files and different modules
Laravel subdomain accesses different routing files and different modules
2022-06-26 12:23:00 【Yotoai Mengtian】
To make laravel Access the customized routing file , You can use the following methods :
1、 First in cmd Use in window Command to create a routing file : type nul > blog.php
2、 stay App\Providers\RouteServiceProvider Modify the , Pictured :

3、 establish Blog modular , Use laravel command :php artisan make:controller Blog/IndexController , That's right. app/http/Controllers/ I created Blog modular .
4、 stay blog.php Add the following code to :

5、 To configure windows Of hosts file add to :127.0.0.1 blog.mtblog.com
nginx Middle configuration vhost Use this domain name to point to your project directory
And then visit blog.mtblog.com , As shown in the figure :

边栏推荐
- Jsonarray and jsonobject of fastjson [easy to understand]
- Question B of 2016 Sichuan Ti Cup Electronic Design Competition
- 【Redis 系列】redis 学习十六,redis 字典(map) 及其核心编码结构
- Leetcode 78. 子集 and 90. 子集 II
- 24 database interview questions that must be mastered!
- [solved] data duplication or data loss after laravel paginate() paging
- HUST网络攻防实践|6_物联网设备固件安全实验|实验二 基于 MPU 的物联网设备攻击缓解技术
- Analysis report on the "fourteenth five year plan" and investment prospect of China's pharmaceutical equipment industry 2022-2028
- Loggie encoding and newline character test
- fastjson的JSONArray和JSONObject[通俗易懂]
猜你喜欢

Ad - update the modified PCB package to the current PCB

Prospering customs through science and technology, Ronglian and Tianjin Customs jointly build a genomic database and analysis platform

Spark-day03-core programming RDD operator

Spark-day02-core programming-rdd

PHP laravel+gatewayworker completes im instant messaging and file transfer (Chapter 1: basic configuration)

Loggie encoding and newline character test

Spark-day01- get started quickly
![[solved] data duplication or data loss after laravel paginate() paging](/img/68/7bf51bbf893a91bee24f5f7d4a369f.jpg)
[solved] data duplication or data loss after laravel paginate() paging

Scala-day06- pattern matching - Generic
![[graduation season · advanced technology Er] I remember the year after graduation](/img/e7/8e1dafa561217b77a3e3992977a8ec.png)
[graduation season · advanced technology Er] I remember the year after graduation
随机推荐
2022 edition of Beijing 5g industry investment planning and development prospect forecast analysis report
How to calculate flops and params in deep learning
证券账户可以开通 开户安全吗
fastjson的JSONArray和JSONObject[通俗易懂]
Microservice governance (nocas)
Build document editor based on slate
Xiaolong 888 was released, Xiaomi 11 was launched, and 14 manufacturers carried it in the first batch!
Analysis report on dynamic research and investment planning suggestions of China's laser medical market in 2022
How to prevent weight loss under Gao Bingfa?
Statistical genetics: Chapter 2, the concept of statistical analysis
PolarisMesh系列文章——概念系列(一)
PHP uses laravel pay component to quickly access wechat jsapi payment (wechat official account payment)
PHP laravel+gatewayworker completes im instant messaging and file transfer functions (Chapter 2: explanation of business logic)
2022 edition of China's cotton chemical fiber printing and dyeing Market Status Investigation and Prospect Forecast Analysis Report
请指教同花顺是什么软件?在线开户安全么?
Redis cannot connect to the server through port 6379
PHP laravel+gatewayworker completes im instant messaging and file transfer (Chapter 1: basic configuration)
Hello! Forward proxy!
2021 q3-q4 investigation report on the use status of kotlin multiplatform
菜鸟实战UML——活动图