上一页 1 ··· 12 13 14 15 16
摘要: 翻译过来就是 期望参数1是字符串 意思就是说变量为数组,应以数组的方式输出 @foreach($xxx as $k=>$y) {{$k}}{{$y}} @endforeach 阅读全文
posted @ 2019-01-17 17:47 钧一 阅读(7971) 评论(0) 推荐(0) 编辑
摘要: @foreach($xxx as $k=>$y) {{$y->id}} @endforeach 阅读全文
posted @ 2019-01-17 17:10 钧一 阅读(1746) 评论(0) 推荐(0) 编辑
摘要: DB::table('表名')->get(); //查询表里的所有数据 DB::table('表名')->where()->find(需要查询的条数); 查询单或多条数据 DB::table('表名')->insert(要添加的数据); 在表里添加一条数据 DB::table('表名')->wher 阅读全文
posted @ 2019-01-17 15:03 钧一 阅读(1284) 评论(0) 推荐(0) 编辑
摘要: <?php namespace App\Http\Controllers; use App\Index; use App\Http\Controllers\Controller; class IndexController extends Controller{ public function in 阅读全文
posted @ 2019-01-17 09:55 钧一 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 目录 App\Models 没有就自己创一个 创建对应控制器的php文件,首字母大写 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; clas 阅读全文
posted @ 2019-01-17 09:37 钧一 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 目录 routes\web.php 初始路由,直接渲染视图welcome,即V层 '/'为路径:www.xxx.com/ Route::get('/', function () { return view('welcome'); }); 直接渲染视图welcome,即V层 'home'为路径:www 阅读全文
posted @ 2019-01-17 09:00 钧一 阅读(1376) 评论(0) 推荐(0) 编辑
摘要: 目录 app\config\app.php 找到 'timezone' =>'',在双引号里加上PRC(中华人民共和国缩写)即可; 阅读全文
posted @ 2019-01-16 16:56 钧一 阅读(3185) 评论(0) 推荐(0) 编辑
摘要: laravel MVC分布 M app\Http\Middleware V resources\views C app\Http\Controllers 数据库配置 目录 config\database.php 根据自己所需要的选取并修改ip地址,以及在第16行的default里设置自己需要的数据库 阅读全文
posted @ 2019-01-16 16:40 钧一 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 1、ls 命令 ls 列出当前目录的所有文件 ls -a 列出当前目录的所有文件,包括以 . 开头的隐藏文件 ls -r 列出当前目录的所有文件,倒序 ls -t 以文件修改的时间排序 ls -S 以文件大小排序 cd .. 返回上级目录 php -v 查看当前版本 find 查找范围 -name 阅读全文
posted @ 2019-01-15 16:34 钧一 阅读(219) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16