随笔分类 -  laravel

摘要:<?php namespace App\Http\Controllers; use http\Env\Request; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\Di 阅读全文
posted @ 2020-06-26 15:28 辉辉、 阅读(352) 评论(0) 推荐(0) 编辑
摘要:1.在路由处设置参数name Route::get('/index/{name}','Controller@index'); 2.接收name参数,使用view调用显示html页面 <?php namespace App\Http\Controllers; use http\Env\Request; 阅读全文
posted @ 2020-06-26 15:11 辉辉、 阅读(394) 评论(0) 推荐(0) 编辑
摘要:Route::prefix('admin')->group(function (){ Route::get('/test1','Admin\AdminController@test1'); Route::get('/test2','Admin\AdminController@test2'); }); 阅读全文
posted @ 2020-06-26 12:37 辉辉、 阅读(215) 评论(0) 推荐(0) 编辑
摘要:1.首先定义两个路由 Route::get('/{name}','Conterller@index'); Route::get('/routes','Conterller@routes'); 2.创建中间件php artisan make:middleware checkName 创建中间件目录如下 阅读全文
posted @ 2020-06-26 12:02 辉辉、 阅读(199) 评论(0) 推荐(0) 编辑
摘要:1 <?php 2 3 4 namespace App\Http\Controllers; 5 6 7 use http\Env\Request; 8 9 class resourceController 10 { 11 public function index(){ // 12 dump("in 阅读全文
posted @ 2020-06-26 11:29 辉辉、 阅读(190) 评论(0) 推荐(0) 编辑
摘要:1.重新获取key值(在项目根目录执行):php artisan key:generate 2.查看env.文件的key,刷新成功! 阅读全文
posted @ 2020-06-25 16:01 辉辉、 阅读(377) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示