Laravel Show方法不起作用?

时间:2018-06-05 09:03:15

标签: laravel

我正在使用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);
}

即使我试图从视图输出显示空白区域。

0 个答案:

没有答案