{"id":21467387,"url":"https://github.com/elusivecodes/fyreview","last_synced_at":"2025-07-15T05:31:19.656Z","repository":{"id":62508456,"uuid":"442094405","full_name":"elusivecodes/FyreView","owner":"elusivecodes","description":"FyreView is a free, open-source template rendering library for PHP.","archived":false,"fork":false,"pushed_at":"2024-10-17T14:18:32.000Z","size":291,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-18T09:39:04.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elusivecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T08:11:26.000Z","updated_at":"2024-10-17T14:18:26.000Z","dependencies_parsed_at":"2024-02-17T15:31:11.231Z","dependency_job_id":"a71b66bd-6ec8-4a89-8269-e45cd7bfc142","html_url":"https://github.com/elusivecodes/FyreView","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elusivecodes","download_url":"https://codeload.github.com/elusivecodes/FyreView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226017447,"owners_count":17560511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T08:17:49.781Z","updated_at":"2025-07-15T05:31:19.637Z","avatar_url":"https://github.com/elusivecodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FyreView\r\n\r\n**FyreView** is a free, open-source template rendering library for *PHP*.\r\n\r\n\r\n## Table Of Contents\r\n- [Installation](#installation)\r\n- [Basic Usage](#basic-usage)\r\n- [Methods](#methods)\r\n- [Layouts](#layouts)\r\n- [Cells](#cells)\r\n- [Elements](#elements)\r\n- [Blocks](#blocks)\r\n- [Template Locator](#template-locator)\r\n- [Cell Registry](#cell-registry)\r\n- [Helper Registry](#helper-registry)\r\n- [Helpers](#helpers)\r\n    - [CSP](#csp)\r\n    - [Form](#form)\r\n    - [Format](#format)\r\n    - [Url](#url)\r\n\r\n\r\n\r\n## Installation\r\n\r\n**Using Composer**\r\n\r\n```\r\ncomposer require fyre/view\r\n```\r\n\r\nIn PHP:\r\n\r\n```php\r\nuse Fyre\\View\\View;\r\n```\r\n\r\n\r\n## Basic Usage\r\n\r\n- `$templateLocator` is a [*TemplateLocator*](#template-locator).\r\n- `$helperRegistry` is a [*HelperRegistry*](#helper-registry).\r\n- `$cellRegistry` is a [*CellRegistry*](#cell-registry).\r\n- `$request` is a [*ServerRequest*](https://github.com/elusivecodes/FyreServer#server-requests).\r\n\r\n```php\r\n$view = new View($templateLocator, $helperRegistry, $cellRegistry, $request);\r\n```\r\n\r\nAny dependencies will be injected automatically when loading from the [*Container*](https://github.com/elusivecodes/FyreContainer).\r\n\r\n```php\r\n$view = $container-\u003euse(View::class);\r\n```\r\n\r\n\r\n## Methods\r\n\r\n**Get Data**\r\n\r\nGet the view data.\r\n\r\n```php\r\n$data = $view-\u003egetData();\r\n```\r\n\r\n**Get Layout**\r\n\r\nGet the layout.\r\n\r\n```php\r\n$layout = $view-\u003egetLayout();\r\n```\r\n\r\n**Get Request**\r\n\r\nGet the [*ServerRequest*](https://github.com/elusivecodes/FyreServer#server-requests).\r\n\r\n```php\r\n$request = $view-\u003egetRequest();\r\n```\r\n\r\n**Load Helper**\r\n\r\nLoad a [*Helper*](#helpers).\r\n\r\n- `$name` is a string representing the helper name.\r\n- `$options` is an array containing helper options.\r\n\r\n```php\r\n$helper = $view-\u003eloadHelper($name, $options);\r\n```\r\n\r\n**Render**\r\n\r\nRender a template.\r\n\r\n- `$file` is a string representing the template file.\r\n\r\n```php\r\necho $view-\u003erender($file);\r\n```\r\n\r\nTemplates files must end in the extension `.php`, and must exist in one of the defined [*TemplateLocator*](#template-locator) paths.\r\n\r\n**Set Data**\r\n\r\nSet view data.\r\n\r\n- `$data` is an array containing data to pass to the template.\r\n\r\n```php\r\n$view-\u003esetData($data);\r\n```\r\n\r\n**Set Layout**\r\n\r\nSet the layout.\r\n\r\n- `$layout` is a string representing the layout file.\r\n\r\n```php\r\n$view-\u003esetLayout($layout);\r\n```\r\n\r\nLayout files must end in the extension `.php`, and must exist in a \"*layouts*\" folder in one of the defined [*TemplateLocator*](#template-locator) paths.\r\n\r\n\r\n### Layouts\r\n\r\nYou can use layouts when rendering views by placing a `default.php` file in a *layouts* folder of one of the defined [*TemplateLocator*](#template-locator) paths. You can create multiple layouts, and specify the layout to use with the `setLayout` method above.\r\n\r\nThe rendered content is passed to the layout file via the `content` method of `$this`. Any other defined data is also passed to the layout.\r\n\r\n```php\r\n$this-\u003econtent();\r\n```\r\n\r\n\r\n## Cells\r\n\r\nCustom cells can be created by extending `\\Fyre\\View\\Cell`, and suffixing the class name with \"*Cell*\".\r\n\r\n**Cell**\r\n\r\nRender a *Cell*.\r\n\r\n- `$cell` is a string, and can either represent the cell name (implementing a `display` method) or in the format of \"*Cell::method*\".\r\n- `$args` is an array of arguments that will be passed to the cell method, and will default to *[]*.\r\n\r\n```php\r\necho $this-\u003ecell($cell, $args);\r\n```\r\n\r\nCell classes must exist in a namespace that will be loaded by the [*CellRegistry*](#cell-registry).\r\n\r\n\r\n## Elements\r\n\r\n**Element**\r\n\r\nRender an element.\r\n\r\n- `$file` is a string representing the element file.\r\n- `$data` is an array containing data to pass to the element, and will default to *[]*.\r\n\r\n```php\r\necho $this-\u003eelement($file, $data);\r\n```\r\n\r\nElement files must end in the extension `.php`, and must exist in an \"*elements*\" folder in one of the defined [*TemplateLocator*](#template-locator) paths.\r\n\r\n\r\n## Blocks\r\n\r\n**Append**\r\n\r\nAppend content to a block.\r\n\r\n- `$name` is a string representing the block name.\r\n\r\n```php\r\n$this-\u003eappend($name);\r\n```\r\n\r\nAny output until the block is ended will be appended to the block.\r\n\r\n**Assign**\r\n\r\nAssign content to a block.\r\n\r\n- `$name` is a string representing the block name.\r\n- `$content` is a string representing the content.\r\n\r\n```php\r\n$this-\u003eassign($name, $content);\r\n```\r\n\r\n**End**\r\n\r\nEnd a block.\r\n\r\n```php\r\n$this-\u003eend();\r\n```\r\n\r\n**Fetch**\r\n\r\nFetch a block.\r\n\r\n- `$name` is a string representing the block name.\r\n- `$default` is a string representing the default value, and will default to \"\".\r\n\r\n```php\r\n$block = $this-\u003efetch($name, $default);\r\n```\r\n\r\n**Prepend**\r\n\r\nPrepend content to a block.\r\n\r\n- `$name` is a string representing the block name.\r\n\r\n```php\r\n$this-\u003eprepend($name);\r\n```\r\n\r\nAny output until the block is ended will be prepended to the block.\r\n\r\n**Reset**\r\n\r\nReset content of a block.\r\n\r\n- `$name` is a string representing the block name.\r\n\r\n```php\r\n$this-\u003ereset($name);\r\n```\r\n\r\n**Start**\r\n\r\n- `$name` is a string representing the block name.\r\n\r\nStart content for a block.\r\n\r\n```php\r\n$this-\u003estart($name);\r\n```\r\n\r\n\r\n## Template Locator\r\n\r\n```php\r\nuse Fyre\\View\\TemplateLocator;\r\n```\r\n\r\n```php\r\n$templateLocator = new TemplateLocator();\r\n```\r\n\r\n**Autoloading**\r\n\r\nIt is recommended to bind the *TemplateLocator* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.\r\n\r\n```php\r\n$container-\u003esingleton(TemplateLocator::class);\r\n```\r\n\r\n### Template Locator Methods\r\n\r\n**Add Path**\r\n\r\nAdd a path for loading templates.\r\n\r\n- `$path` is a string representing the path.\r\n\r\n```php\r\n$templateLocator-\u003eaddPath($path);\r\n```\r\n\r\n**Get Paths**\r\n\r\nGet the paths.\r\n\r\n```php\r\n$paths = $templateLocator-\u003egetPaths();\r\n```\r\n\r\n**Locate**\r\n\r\nFind a file in paths.\r\n\r\n- `$file` is a string representing the file name.\r\n- `$folder` is a string representing the folder name, and will default to \"\".\r\n\r\n```php\r\n$filePath = $templateLocator-\u003efindFile($file, $folder);\r\n```\r\n\r\n**Remove Path**\r\n\r\n- `$path` is a string representing the path.\r\n\r\n```php\r\n$templateLocator-\u003eremovePath($path);\r\n```\r\n\r\n### Template Locator Static Methods\r\n\r\n**Normalize**\r\n\r\nNormalize a template file name.\r\n\r\n- `$string` is a string representing the file name.\r\n\r\n```php\r\n$normalized = TemplateLocator::normalize($string);\r\n```\r\n\r\n\r\n## Cell Registry\r\n\r\n```php\r\nuse Fyre\\View\\CellRegistry;\r\n```\r\n\r\n- `$container` is a [*Container*](https://github.com/elusivecodes/FyreContainer).\r\n\r\n```php\r\n$cellRegistry = new CellRegistry($container);\r\n```\r\n\r\n**Autoloading**\r\n\r\nIt is recommended to bind the *CellRegistry* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.\r\n\r\n```php\r\n$container-\u003esingleton(CellRegistry::class);\r\n```\r\n\r\nAny dependencies will be injected automatically when loading from the [*Container*](https://github.com/elusivecodes/FyreContainer).\r\n\r\n```php\r\n$cellRegistry = $container-\u003euse(CellRegistry::class);\r\n```\r\n\r\n### Cell Registry Methods\r\n\r\n**Add Namespace**\r\n\r\nAdd a namespace for automatically loading cells.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$cellRegistry-\u003eaddNamespace($namespace);\r\n```\r\n\r\n**Build**\r\n\r\nBuild a cell.\r\n\r\n- `$name` is a string representing the cell name.\r\n- `$view` is a *View*.\r\n- `$options` is an array containing cell options.\r\n\r\n```php\r\n$cell = $cellRegistry-\u003ebuild($name, $view, $options);\r\n```\r\n\r\n**Clear**\r\n\r\nClear all namespaces and cells.\r\n\r\n```php\r\n$cellRegistry-\u003eclear();\r\n```\r\n\r\n**Find**\r\n\r\nFind a cell class.\r\n\r\n- `$name` is a string representing the cell name.\r\n\r\n```php\r\n$className = $cellRegistry-\u003efind($name);\r\n```\r\n\r\n**Get Namespaces**\r\n\r\nGet the namespaces.\r\n\r\n```php\r\n$namespaces = $cellRegistry-\u003egetNamespaces();\r\n```\r\n\r\n**Has Namespace**\r\n\r\nCheck if a namespace exists.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$hasNamespace = $cellRegistry-\u003ehasNamespace($namespace);\r\n```\r\n\r\n**Remove Namespace**\r\n\r\nRemove a namespace.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$cellRegistry-\u003eremoveNamespace($namespace);\r\n```\r\n\r\n\r\n## Helper Registry\r\n\r\n```php\r\nuse Fyre\\View\\HelperRegistry;\r\n```\r\n\r\n- `$container` is a [*Container*](https://github.com/elusivecodes/FyreContainer).\r\n\r\n```php\r\n$helperRegistry = new HelperRegistry($container);\r\n```\r\n\r\n**Autoloading**\r\n\r\nIt is recommended to bind the *HelperRegistry* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.\r\n\r\n```php\r\n$container-\u003esingleton(HelperRegistry::class);\r\n```\r\n\r\nAny dependencies will be injected automatically when loading from the [*Container*](https://github.com/elusivecodes/FyreContainer).\r\n\r\n```php\r\n$helperRegistry = $container-\u003euse(HelperRegistry::class);\r\n```\r\n\r\n### Helper Registry Methods\r\n\r\n**Add Namespace**\r\n\r\nAdd a namespace for automatically loading helpers.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$helperRegistry-\u003eaddNamespace($namespace);\r\n```\r\n\r\n**Build**\r\n\r\nBuild a helper.\r\n\r\n- `$name` is a string representing the helper name.\r\n- `$view` is a *View*.\r\n- `$options` is an array containing helper options.\r\n\r\n```php\r\n$helper = $helperRegistry-\u003ebuild($name, $view, $options);\r\n```\r\n\r\n**Clear**\r\n\r\nClear all namespaces and helpers.\r\n\r\n```php\r\n$helperRegistry-\u003eclear();\r\n```\r\n\r\n**Find**\r\n\r\nFind a helper class.\r\n\r\n- `$name` is a string representing the helper name.\r\n\r\n```php\r\n$className = $helperRegistry-\u003efind($name);\r\n```\r\n\r\n**Get Namespaces**\r\n\r\nGet the namespaces.\r\n\r\n```php\r\n$namespaces = $helperRegistry-\u003egetNamespaces();\r\n```\r\n\r\n**Has Namespace**\r\n\r\nCheck if a namespace exists.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$hasNamespace = $helperRegistry-\u003ehasNamespace($namespace);\r\n```\r\n\r\n**Remove Namespace**\r\n\r\nRemove a namespace.\r\n\r\n- `$namespace` is a string representing the namespace.\r\n\r\n```php\r\n$helperRegistry-\u003eremoveNamespace($namespace);\r\n```\r\n\r\n\r\n## Helpers\r\n\r\nHelpers can be used inside of templates or elements using the class name as a property of `$this`.\r\n\r\n```php\r\n$helper = $this-\u003eMyHelper;\r\n```\r\n\r\nAlternatively, you can load a helper with configuration options using the `loadHelper` method of the *View*.\r\n\r\nCustom helpers can be created by extending `\\Fyre\\View\\Helper`, suffixing the class name with \"*Helper*\", and ensuring the `__construct` method accepts *View* as the argument (and optionally an `$options` array as the second parameter).\r\n\r\n**Get Config**\r\n\r\nGet the configuration options.\r\n\r\n```php\r\n$config = $helper-\u003egetConfig();\r\n```\r\n\r\n**Get View**\r\n\r\nGet the *View*.\r\n\r\n```php\r\n$view = $helper-\u003egetView();\r\n```\r\n\r\n\r\n### CSP\r\n\r\nThe CSP helper allows an easy way to generate nonces, and automatically add them to your [*CSP*](https://github.com/elusivecodes/FyreCSP) policies.\r\n\r\n**Script Nonce**\r\n\r\nGenerate a script nonce.\r\n\r\n```php\r\n$nonce = $this-\u003eCSP-\u003escriptNonce();\r\n```\r\n\r\n**Style Nonce**\r\n\r\nGenerate a style nonce.\r\n\r\n```php\r\n$nonce = $this-\u003eCSP-\u003estyleNonce();\r\n```\r\n\r\n\r\n### Form\r\n\r\n**Button**\r\n\r\nRender a button element.\r\n\r\n- `$content` is a string representing the button content.\r\n- `$options` is an array of options for rendering the button.\r\n\r\n```php\r\n$button = $this-\u003eForm-\u003ebutton($content, $options);\r\n```\r\n\r\nBy default, the button content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.\r\n\r\nAll other `options` will be created as attributes on the button element.\r\n\r\n**Close**\r\n\r\nRender a form close tag.\r\n\r\n```php\r\n$close = $this-\u003eForm-\u003eclose();\r\n```\r\n\r\n**Fieldset Close**\r\n\r\nRender a fieldset close tag.\r\n\r\n```php\r\n$fieldsetClose = $this-\u003eForm-\u003efieldsetClose();\r\n```\r\n\r\n**Fieldset Open**\r\n\r\nRender a fieldset open tag.\r\n\r\n- `$options` is an array of options for rendering the fieldset.\r\n\r\n```php\r\n$fieldset = $this-\u003eForm-\u003efieldsetOpen($options);\r\n```\r\n\r\nAll `options` will be created as attributes on the fieldset element.\r\n\r\n**Input**\r\n\r\nRender an input element.\r\n\r\n- `$key` is a string representing the field key, using dot notation.\r\n- `$options` is an array of options for rendering the label.\r\n\r\n```php\r\n$input = $this-\u003eForm-\u003einput($key, $options);\r\n```\r\n\r\nAll `options` will be created as attributes on the input element.\r\n\r\n- The default `id` and `name` attributes will be converted from the field key.\r\n- The input `type` and other default attributes will be determined from the [*TableSchema*](https://github.com/elusivecodes/FyreSchema#table-schemas) and [*Model Validation*](https://github.com/elusivecodes/FyreORM#validation).\r\n- The default value will be retrieved from the [*ServerRequest*](https://github.com/elusivecodes/FyreServer#server-requests) `$_POST` data or form context.\r\n    - If the form was opened in an [*Entity*](https://github.com/elusivecodes/FyreEntity) context, the [*Entity*](https://github.com/elusivecodes/FyreEntity) and the [*TableSchema*](https://github.com/elusivecodes/FyreSchema#table-schemas) will also be used.\r\n- Select options can be specified using the `options` key.\r\n- Checkboxes and radio inputs can be marked as checked by setting the `checked` option to *true*.\r\n- Multiple select menus will (by default) render a hidden field with an empty value. This can be disabled by setting the `hiddenField` option to *false*.\r\n- Checkboxes will (by default) render a hidden field with the value \"*0*\". This can be disabled by setting the `hiddenField` option to *false*.\r\n\r\nYou can also use the following helper methods to generate specific input type fields.\r\n\r\n```php\r\n$input = $this-\u003eForm-\u003echeckbox($key, $options);\r\n$input = $this-\u003eForm-\u003ecolor($key, $options);\r\n$input = $this-\u003eForm-\u003edate($key, $options);\r\n$input = $this-\u003eForm-\u003edatetime($key, $options);\r\n$input = $this-\u003eForm-\u003eemail($key, $options);\r\n$input = $this-\u003eForm-\u003efile($key, $options);\r\n$input = $this-\u003eForm-\u003ehidden($key, $options);\r\n$input = $this-\u003eForm-\u003eimage($key, $options);\r\n$input = $this-\u003eForm-\u003emonth($key, $options);\r\n$input = $this-\u003eForm-\u003enumber($key, $options);\r\n$input = $this-\u003eForm-\u003epassword($key, $options);\r\n$input = $this-\u003eForm-\u003eradio($key, $options);\r\n$input = $this-\u003eForm-\u003erange($key, $options);\r\n$input = $this-\u003eForm-\u003ereset($key, $options);\r\n$input = $this-\u003eForm-\u003esearch($key, $options);\r\n$input = $this-\u003eForm-\u003eselect($key, $options);\r\n$input = $this-\u003eForm-\u003eselectMulti($key, $options);\r\n$input = $this-\u003eForm-\u003esubmit($key, $options);\r\n$input = $this-\u003eForm-\u003etel($key, $options);\r\n$input = $this-\u003eForm-\u003etext($key, $options);\r\n$input = $this-\u003eForm-\u003etime($key, $options);\r\n$input = $this-\u003eForm-\u003eurl($key, $options);\r\n$input = $this-\u003eForm-\u003eweek($key, $options);\r\n```\r\n\r\n**Label**\r\n\r\nRender a label element.\r\n\r\n- `$key` is a string representing the field key.\r\n- `$options` is an array of options for rendering the label.\r\n\r\n```php\r\n$label = $this-\u003eForm-\u003elabel($key, $options);\r\n```\r\n\r\nThe label text will be retrieved from the [*Lang*](https://github.com/elusivecodes/FyreLang) using the `Field.{field_name}` key or converted from the field name. You can also set custom label text by setting the `text` option.\r\n\r\nBy default, the label content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.\r\n\r\nAll other `options` will be created as attributes on the label element. The default `for` attribute will be converted from the field key.\r\n\r\n**Legend**\r\n\r\nRender a legend element.\r\n\r\n- `$content` is a string representing the legend content.\r\n- `$options` is an array of options for rendering the legend.\r\n\r\n```php\r\n$legend = $this-\u003eForm-\u003elegend($content, $options);\r\n```\r\n\r\nBy default, the legend content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.\r\n\r\nAll other `options` will be created as attributes on the legend element.\r\n\r\n**Open**\r\n\r\nRender a form open tag.\r\n\r\n- `$item` is an [*Entity*](https://github.com/elusivecodes/FyreEntity) or other (supported) object representing the form context, and will default to *null*\r\n- `$options` is an array of options for rendering the form.\r\n\r\n```php\r\n$open = $this-\u003eForm-\u003eopen($item, $options);\r\n```\r\n\r\nAll `options` will be created as attributes on the form element.\r\n\r\n**Open Multipart**\r\n\r\nRender a multipart form open tag.\r\n\r\n- `$item` is an array or object representing the form context, and will default to *null*\r\n- `$options` is an array of options for rendering the form.\r\n\r\n```php\r\n$open = $this-\u003eForm-\u003eopenMultipart($item, $options);\r\n```\r\n\r\nAll `options` will be created as attributes on the form element.\r\n\r\n\r\n### Format\r\n\r\nThe format helper provides a convenient wrapper for [*Formatter*](https://github.com/elusivecodes/FyreFormatter) methods.\r\n\r\n\r\n### Url\r\n\r\nThe URL helper provides methods for generating [*Router*](https://github.com/elusivecodes/FyreRouter) links.\r\n\r\n**Link**\r\n\r\nGenerate an anchor link for a destination.\r\n\r\n- `$content` is a string representing the link content.\r\n- `$options` is an array containing options.\r\n    - `escape` is a boolean indicating whether to escape the link content, and will default to *true*.\r\n    - `fullBase` is a boolean indicating whether to use the full base URI, and will default to *false*.\r\n\r\n```php\r\n$link = $this-\u003eUrl-\u003elink($content, $options);\r\n```\r\n\r\n**Path**\r\n\r\nGenerate a url for a relative path.\r\n\r\n- `$path` is a string representing the file path.\r\n- `$options` is an array containing options.\r\n    - `fullBase` is a boolean indicating whether to use the full base URI, and will default to *false*.\r\n\r\n```php\r\n$url = $this-\u003eUrl-\u003epath($path, $options);\r\n```\r\n\r\n**To**\r\n\r\nGenerate a url for a named route.\r\n\r\n- `$name` is a string representing the route alias.\r\n- `$arguments` is an array containing the route arguments.\r\n    - `?` is an array containing route query parameters.\r\n    - `#` is a string representing the fragment component of the URI.\r\n- `$options` is an array containing options.\r\n    - `fullBase` is a boolean indicating whether to use the full base URI, and will default to *false*.\r\n\r\n```php\r\n$url = $this-\u003eUrl-\u003eto($destination, $options);\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felusivecodes%2Ffyreview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreview/lists"}