PHPackages                             leafs/anchor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. leafs/anchor

ActiveLibrary[Framework](/categories/framework)

leafs/anchor
============

Leaf PHP util module

v1.6.2(1y ago)254.3k↓26%18MITPHP

Since Sep 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/leafsphp/anchor)[ Packagist](https://packagist.org/packages/leafs/anchor)[ Docs](https://leafphp.netlify.app/#/)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-anchor/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (1)Versions (12)Used By (8)

 [![](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)

Leaf Anchor
===========

[](#leaf-anchor)

[![Latest Stable Version](https://camo.githubusercontent.com/e9edab6fffb034491d8205786e2f14188675ad9341273c9f4c89c47dc07a7eae/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616e63686f722f762f737461626c65)](https://packagist.org/packages/leafs/anchor)[![Total Downloads](https://camo.githubusercontent.com/9a2a688322320a7c066374c1a0192d3ff461cfee54feff30210f62683f23f737/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616e63686f722f646f776e6c6f616473)](https://packagist.org/packages/leafs/anchor)[![License](https://camo.githubusercontent.com/52af5d46b833e378f1620c9854bdb8e4f90c1492c039882a7d6fc1c66826ec4d/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616e63686f722f6c6963656e7365)](https://packagist.org/packages/leafs/anchor)

This package contains leaf's utils for deep sanitizing of data and basic security provided for your app data. It also serves as the base for security provided in other modules like CSRF.

Installation
------------

[](#installation)

You can easily install Leaf using [Composer](https://getcomposer.org/).

```
composer require leafs/anchor
```

Basic Usage
-----------

[](#basic-usage)

After [installing](#installation) anchor, create an *index.php* file.

### Base XSS protection

[](#base-xss-protection)

```
