<?php namespace App\Http\Controllers; use App\Index; use App\Http\Controllers\Controller; class IndexController extends Controller{ public function index(){ $new = new XXXXModel; $res = $new->方法名();调用方法进行数据库操作,$res为返回值 $a = 1111; return view('index'…
目录 App\Models 没有就自己创一个 创建对应控制器的php文件,首字母大写 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; class 文件名 extends Model{ //查询数据库表方法 public function 方法名(){ $res = DB::table('数据库表名')->get(); return $…
Call to undefined method Illuminate\Foundation\Application::bindShared() 错误代码 Call to undefined method Illuminate\Foundation\Application::bindShared() 原因 The Form and HTML helpers have been deprecated in Laravel 5.0; form模块依赖于laravel 5.0框架,所以在默认的5.2框…