for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaraCrafts\GeoRoutes\Concerns;
trait ControlsAccess
{
/**
* Determines whether to allow or deny access.
*
* @var string
*/
protected $strategy;
* The countries to apply the rule for.
* @var array
protected $countries;
* Allow access from the given countries.
* @param string ...$countries
* @return $this
public function allowFrom(string ...$countries)
$this->strategy = 'allow';
$this->countries = $countries;
return $this;
}
* Deny access from the given countries.
public function denyFrom(string ...$countries)
$this->strategy = 'deny';
* Allow given countries.
public function allow()
* Deny given countries.
public function deny()