php - Foreign value relations to store in revisionable -


i using venturecraft/revisionable in laravel project. wanted work on multiple models @ once, since revisionable doesn't allow me so, did in single models.

there 1 instance, got revisionable output this

chris changed status 4 5. 

but, instead this, wanted this:

chris changed status new in progress. 

4 , 5 foreign keys name new , in progress.

how can use foreign value relations in revisionable.

i've never used package, looking @ documentation looks need implement identifiablename() method in related model. instead of displaying foreign keys, display whatever returned identifiablename() method.

so, if related model status, like:

class status extends eloquent {     use venturecraft\revisionable\revisionabletrait;      public function identifiablename() {         return $this->name;     } } 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -