課程
/后端開發(fā)
/PHP
/輕松學(xué)會Laravel-表單篇
Call to a member function format() on string ?有沒有出現(xiàn)這樣錯誤的呀?
2017-09-13
源自:輕松學(xué)會Laravel-表單篇 2-7
正在回答
把student模型中的以下代碼注釋起來
// ? ?protected ?function asDateTime($val) {// ? ? ? ?return $val;// ? ?}
并將index.blade.php頁面中的
<td>{{ date('Y-m-d', $student->created_at) }}</td>
更改為
<td>{{ $student->created_at }}</td>
灰白兔奶糖
有,不知道為什么,把時間戳改為false不知道為什么就行了
我不是凱丁
舉報
Laravel框架是世界上最流行的PHP框架,沒有之一
2 回答Call to a member function format() on string 或者 Call to a member function format() on integer
4 回答Call to a member function format() on string
1 回答call to member function sex() on string
2 回答to a string?
1 回答Call to undefined function Illuminate\Encryption\openssl_encrypt()
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-11-03
把student模型中的以下代碼注釋起來
// ? ?protected ?function asDateTime($val) {
// ? ? ? ?return $val;
// ? ?}
并將index.blade.php頁面中的
<td>{{ date('Y-m-d', $student->created_at) }}</td>
更改為
<td>{{ $student->created_at }}</td>
2017-09-22
有,不知道為什么,把時間戳改為false不知道為什么就行了