Advanced Guides

Revisions

Autoload keeps record of important changes to your Models that can be used to revert back to a previous version. The Models that are automatically tracked with Revisions are:

  • Pages
  • Reusable Blocks
  • Notification Bars

For each of these Models, when a new version or a new change is added, Autoload saves the previous version as a Revision record.

Reverting to a Revision

Within each of a Revisionable Model's "edit" page in the Filament CMS, scroll down to the bottom of the page to see the Revision history, complete with timestamps of when the Revision was created.

You may revert the current Model to a previous Revision by clicking the "Restore" link on the row you want. This will display a confirmation popup for you to confirm the Revision.

Extending to other Models

You may add Revisions to your other Models by including the Trait in your Model class:

    
1use \Mergeloop\Autoload\Support\HasModelRevisions;

And also including the Revision CMS display in your Model's Filament Resource:

    
1public static function getRelations(): array
2{
3 return [
4 \Mergeloop\Autoload\Filament\Resources\RevisionRelationManager::class,
5 ];
6}
Previous
Caching
Code highlighting provided by Torchlight