Skip to content

Commit

Permalink
Merge pull request #25 from 0xCyyy3000/support-multilevel-models
Browse files Browse the repository at this point in the history
Support multilevel models
  • Loading branch information
MarJose123 authored May 22, 2024
2 parents 99364f7 + e4e977c commit 4b08289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Observers/ModelObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
use Illuminate\Database\Eloquent\Model;
use Marjose123\FilamentWebhookServer\HookJobProcess;
use Marjose123\FilamentWebhookServer\Models\FilamentWebhookServer;
use ReflectionClass as RC;
use Spatie\ModelInfo\ModelInfo;

class ModelObserver
{
public function created(Model $model)
{
$modelInfo = ModelInfo::forModel($model::class);
$module = ucfirst(str_replace("App\Models\\", '', $modelInfo->class));
$module = ucfirst((new RC($model))->getShortName());
/*
* Search on the DB that want to receive webhook from this model
*/
Expand Down

0 comments on commit 4b08289

Please sign in to comment.