VentureCraft / revisionable

Easily create a revision history for any laravel model
http://twitter.com/duellsy
MIT License
2.55k stars 348 forks source link

Nothing happens when I try to save instance from `Comment` model #400

Closed mahmoudmohamedramadan closed 3 years ago

mahmoudmohamedramadan commented 3 years ago

I was would like to work WITH this awesome package into the Laravel project WITH an 8.40 version and PHP WITH an ^8.0 version. I've installed this package successfully and migrated the table

{6E512FF6-4247-4940-9A2E-1FCBE4DFE649}

also, I've used the RevisionableTrait trait in the \App\Models\Comment model and when I tried to add a new comment to the post nothing happens in the database

{8DB90833-EA45-4BBA-AE08-7C072B3EFD60}

Here I tried to add a new comment to the post BUT nothing happens

{797645F9-ED65-48D8-AF8B-D7E9D847F9EF}

antoniputra commented 3 years ago

if you are talking about storing revision for recently created model.

You need to enable this:

protected $revisionCreationsEnabled = true;

See more:

https://github.com/VentureCraft/revisionable#storing-creations

mahmoudmohamedramadan commented 3 years ago

@antoniputra thanks... it's working now ✨