我有一个笔记,NoteType和NoteStatus模型。在Note模型中有类型和状态字段,它们将被存储为整数(表示其各自模型的id )。NoteType和NoteStatus模型有id和name字段。foreach($notes as $note) $type=NoteType::where('id',$note->type)->first();
这是我的模型class VehicleModel extends Eloquent protected $primaryKey = 'AutoID'; # to change the primarykey else laravel will consider id as primary key}$vehiclelistkey else laravel<