Initial Commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Story;
|
||||
use App\Services\StoryMediaCacher;
|
||||
|
||||
class StoryObserver
|
||||
{
|
||||
public function __construct(private readonly StoryMediaCacher $mediaCacher)
|
||||
{
|
||||
}
|
||||
|
||||
public function created(Story $story): void
|
||||
{
|
||||
$this->mediaCacher->cache($story);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user