Skip to content

Commit b8458dc

Browse files
authored
Update README.md
Add isArchived & dropArchivedAt
1 parent f0b9983 commit b8458dc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Schema::create('posts', function (Blueprint $table) {
3434
});
3535
```
3636

37+
##### Rollback
38+
39+
```php
40+
Schema::create('posts', function (Blueprint $table) {
41+
$table->dropArchivedAt();
42+
});
43+
```
44+
3745
#### Eloquent
3846
You can now, safely, include the `Archivable` trait in your Eloquent model:
3947

@@ -52,13 +60,16 @@ class Post extends Model {
5260

5361
#### Extensions
5462

55-
The extensions shipped with this trait include; `archive`, `unArchive`, `withArchived`, `withoutArchived`, `onlyArchived` and can be used accordingly:
63+
The extensions shipped with this trait include; `archive`, `unArchive`, `isArchived`, `withArchived`, `withoutArchived`, `onlyArchived` and can be used accordingly:
5664

5765
```php
5866
$user = User::first();
5967
$user->archive();
6068
$user->unArchive();
6169

70+
// Check Archive status
71+
$user->isArchived();
72+
6273
$usersWithArchived = User::query()->withArchived();
6374
$onlyArchivedUsers = User::query()->onlyArchived();
6475
```

0 commit comments

Comments
 (0)