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
1 Reply
Solution
isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'No referrer'