我正在使用Laravel 5.6,这是我的模型
class Careers extends Model
{
//
protected $guarded=[];
}
并且,我从CareersController @ show method
获取此输出Careers {#592 ▼
#guarded: []
#connection: null
#table: null
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage: 15
+exists: false
+wasRecentlyCreated: false
#attributes: []
#original: []
#changes: []
#casts: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#fillable: []
}
,show方法为
public function show(Careers $careers)
{
// return view('admin.careers.show',['career'=> $careers]);
dd($careers);
}
即使我试图从视图输出显示空白区域。