摘要:        
翻译过来就是 期望参数1是字符串 意思就是说变量为数组,应以数组的方式输出 @foreach($xxx as $k=>$y) {{$k}}{{$y}} @endforeach    阅读全文
posted @ 2019-01-17 17:47
钧一
阅读(8086)
评论(0)
推荐(0)
        
            
        
        
摘要:        
@foreach($xxx as $k=>$y) {{$y->id}} @endforeach    阅读全文
posted @ 2019-01-17 17:10
钧一
阅读(1770)
评论(0)
推荐(0)
        
            
        
        
摘要:        
DB::table('表名')->get(); //查询表里的所有数据 DB::table('表名')->where()->find(需要查询的条数); 查询单或多条数据 DB::table('表名')->insert(要添加的数据); 在表里添加一条数据 DB::table('表名')->wher    阅读全文
posted @ 2019-01-17 15:03
钧一
阅读(1296)
评论(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
钧一
阅读(300)
评论(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
钧一
阅读(357)
评论(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
钧一
阅读(1392)
评论(0)
推荐(0)
        

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号