Laravel error: Call to a member function format() on string

前端 未结 3 1790
心在旅途
心在旅途 2020-12-10 00:52

I am using Laravel 5.3.

There is a field expired_at in table articles

public function store(Request $re         


        
3条回答
  •  庸人自扰
    2020-12-10 01:55

    In your Article class add following property:

    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    protected $dates = ['expired_at'];
    

    Docs

提交回复
热议问题