Jamie
Jamie

Reputation: 10896

Laravel detect domain

Currently I'm checking the current domain like this:

$this->actionUrl     = url('bericht', $send->message->slug);

Local this is working but if I push this to production it's telling me that the domain is localhost. What would be the right way for things like this should I hard code it?

Upvotes: 0

Views: 1140

Answers (1)

GWed
GWed

Reputation: 15653

I think you can use the Request class:

Request::getHost();

Upvotes: 2

Related Questions