In a laravel model I have:
public function generateUrl(){
return $this->attributes['id'].' - '.$this->attributes['title'];
}
However I am getting "undefined index id". When I type dd($this) in attributes I see only title how can I add id?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire