String Primary Key for Eloquent

http://laravel.com/

http://kejyun.github.io/Laravel-4-Docum ... roduction/
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

String Primary Key for Eloquent

文章 yehlu »

https://stackoverflow.com/questions/345 ... -becomes-0

代碼: 選擇全部

class UserVerification extends Model
{
    protected $primaryKey = 'your_key_name'; // or null

    public $incrementing = false;
}

回覆文章

回到「laravel」