我在 app\Models 中有這個(gè)模型 City.php<?phpnamespace App\Models;use Illuminate\Database\Eloquent\Model;class City extends Model{ //}和這個(gè) CityController.php<?phpnamespace App\Http\Controllers;use App\Models\City;use Illuminate\Http\Request;class CityController extends Controller{ /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $cities = City::OrderBy('city_code')->get(); return view('testcities',compact('cities')); }但我在 laravel 中找回了這個(gè)錯(cuò)誤:找不到錯(cuò)誤類“App\Models\City”
- 2 回答
- 0 關(guān)注
- 153 瀏覽
添加回答
舉報(bào)
0/150
提交
取消