Current route is not working correctly

static::created(function ($model) { dd(Route::current()->uri()); MessageCenter::create([ "ticket_id" => $model->id, "content" => app(Request::class)->all()['components'][0]['updates']['data.content'], "from" => 'clinic' ]); }); i am using in the model, but i just need the create or edit so i put some condition
No description
Solution:
isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'No referrer'
Jump to solution
1 Reply
Solution
AliBabba420
AliBabba4209mo ago
isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'No referrer'