src/Asset/Asset.php
public function to($locations = 'front'): AssetInterface
    {
        if (is_string($locations)) {
            $locations = [$locations];
        }

        foreach ($locations as $location) {
            $hook = array_search($location, $this->locations, true);

            if ($hook) {
                $this->install($hook);
            }
        }

        return $this;
    }
public function to($locations = 'front'): AssetInterface
    {
        if (is_string($locations)) {
            $locations = [$locations];
        }

        foreach ($locations as $location) {
            $hook = array_search($location, $this->locations, true);

            if ($hook) {
                $this->install($hook);
            }
        }

        return $this;
    }
public function to ( $ locations = 'front' ) : AssetInterface { if ( is_string ( $ locations ) ) { $ locations = [ $ locations ] ; } foreach ( $ locations as $ location ) { $ hook = array_search ( $ location , $ this -> locations , true ) ; if ( $ hook ) { $ this -> install ( $ hook ) ; } } return $ this ; }
Load the asset on the defined area. Default to front-end.

@param string|array $locations

@return AssetInterface
Load the asset on the defined area . Default to front - end .