Skip to content

Commit 23b2709

Browse files
Add SoftDeletes support to the Post model
SoftDeletes was added to the Post model to handle soft deletion of posts. This enables better data management and allows recovery of deleted records when necessary. The README has also been updated to reflect this change.
1 parent 78fa959 commit 23b2709

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Your model add traits:
3838
namespace App\Models;
3939

4040
use Illuminate\Database\Eloquent\Model;
41+
use Illuminate\Database\Eloquent\SoftDeletes;
4142
use JeffersonGoncalves\CreatedBy\WithCreatedBy;
4243
use JeffersonGoncalves\CreatedBy\WithUpdatedBy;
4344
use JeffersonGoncalves\CreatedBy\WithDeletedBy;
@@ -46,6 +47,7 @@ use JeffersonGoncalves\CreatedBy\WithRestoredAt;
4647

4748
class Post extends Model
4849
{
50+
use SoftDeletes;
4951
use WithCreatedBy;
5052
use WithUpdatedBy;
5153
use WithDeletedBy;

0 commit comments

Comments
 (0)