我们长路漫漫,只因学无止境。网站首页学无止境
数据库迁移
发布时间:2019-09-15 16:26:18作者:雪饮[心得笔记]
准备工作解决依赖composer require doctrine/dbal创建空白数据库版本管理脚本php artisan make:migration test数据库管理脚本的使用创建好数据库版本管理脚本后,在database
详细信息>>数据库基本操作
发布时间:2019-09-14 20:50:43作者:雪饮[心得笔记]
使用前提:控制器:use DB;.env:配置好数据库信息普通查询$res=Db::select("select * from dede_addonarticle where aid>5");var_dump($res);普通查询-预处理$res=Db::select
详细信息>>Laravel基础之视图
发布时间:2019-09-14 16:38:28作者:雪饮[心得笔记]
子模板示例如:<html>@include('admin.header')<body>引入了当前模板同目录的 header模板继承模板@extends('layout.index')当前模板继承了layout目录的index模板,其实就和上
详细信息>>Laravel基础之响应
发布时间:2019-09-13 16:15:48作者:雪饮[心得笔记]
响应返回jsonreturn response()->json(['name'=>'xy']);下载文件return response()->download('web.config');注意: 需要php_fileinfo的支持页面跳转内部return redirect('/
详细信息>>Laravel基础之请求
发布时间:2019-09-13 11:08:17作者:雪饮[心得笔记]
请求再控制器中需要用到请求对象时候,需要在方法形参上进行注入Request对象获取请求方法public function getShouye(Request $request){ $method=$request->meth
详细信息>>Laravel基础之控制器
发布时间:2019-09-10 21:18:05作者:雪饮[心得笔记]
创建控制器创建控制器在项目根目录创建控制器如:D:\7n\blog>php artisan make:controller TestControllerController created successfully.创建干净控制器使用上面的方法创
详细信息>>Laravel基础之中间件
发布时间:2019-09-08 19:40:17作者:雪饮[心得笔记]
路由别名与route函数定义一个路由如:Route::get('/Admin/User/index', [ 'as'=>'ulist', 'uses'=>function(){ echo route('ulist');
详细信息>>Laravel基础之路由
发布时间:2019-09-08 16:06:37作者:雪饮[心得笔记]
路由定义路由定义在app/http/routes.php中常见的get、post、put、delete定义如:Route::get('/get', function () { return view('get');});Route::post('/post', function
详细信息>>composer安装以及laravel框架的安装配置
发布时间:2019-09-08 10:28:10作者:雪饮[心得笔记]
composer修改镜像地址(源)C:\Users\Administrator>composer config -g repo.packagist composer https://packagist.phpcomposer.com C:\Users\Administrator>使用composer
详细信息>>命名空间和虚拟主机搭建
发布时间:2019-09-06 21:30:54作者:雪饮[心得笔记]
对象索引有脚本如:<?php class a{ }class c{ }$a=new a();$b=new a();$c=new c();var_dump($a);var_dump($b);魔术方法__autoload在命名空间中的妙用假定我
详细信息>>