improve handel requests
This commit is contained in:
@@ -24,7 +24,14 @@ abstract class BaseFormRequest
|
||||
];
|
||||
}
|
||||
|
||||
public function getRoutePath(): string
|
||||
public function isRequestForThisRoute(): bool
|
||||
{
|
||||
return trim($this->getCurrentRoutePath(), '/') === $this->getRequestRoutePath();
|
||||
}
|
||||
|
||||
abstract public function getRequestRoutePath(): string;
|
||||
|
||||
public function getCurrentRoutePath(): string
|
||||
{
|
||||
return $this->url['path'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user