PHPackages                             muhamed-didovic/csrf - 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. [Security](/categories/security)
4. /
5. muhamed-didovic/csrf

ActiveLibrary[Security](/categories/security)

muhamed-didovic/csrf
====================

Protect your application from cross-site request forgery (CSRF) attacks

0.0.3(6y ago)210MITPHPCI failing

Since May 27Pushed 6y ago2 watchersCompare

[ Source](https://github.com/muhamed-didovic/csrf)[ Packagist](https://packagist.org/packages/muhamed-didovic/csrf)[ Docs](https://github.com/muhamed-didovic/csrf)[ RSS](/packages/muhamed-didovic-csrf/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (25)Versions (4)Used By (0)

csrf
====

[](#csrf)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dce2efc2ac735083978f7895dddfba446f86e6cbe86b19b93b895891d2af4c0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d7568616d65642d6469646f7669632f637372662e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhamed-didovic/csrf)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ffbbb07e8a1018bb036c50ba7b1c00c2b587385b79fe7330782ef9f6d084787d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d7568616d65642d6469646f7669632f637372662f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/muhamed-didovic/csrf)[![Coverage Status](https://camo.githubusercontent.com/050eeeab312e453bbb0a011991addfbf5c4b1d69cc08bb270a8c3d02dbab5d34/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d7568616d65642d6469646f7669632f637372662e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/muhamed-didovic/csrf/code-structure)[![Quality Score](https://camo.githubusercontent.com/927e48f66b123d4d41569d298f05657ad187baf83030fcf4864489714aae06ea/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d7568616d65642d6469646f7669632f637372662e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/muhamed-didovic/csrf)[![Total Downloads](https://camo.githubusercontent.com/83f450cb26426f1b92ecb0adda0fd55170b27fdbc849fa028f118799720a8bc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d7568616d65642d6469646f7669632f637372662e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhamed-didovic/csrf)

Protect your application from cross-site request forgery (CSRF) attacks

Structure
---------

[](#structure)

If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.

```
bin/
config/
src/
tests/
vendor/

```

Install
-------

[](#install)

Via Composer

```
$ composer require muhamed-didovic/csrf
```

Usage
-----

[](#usage)

```
$csrf = new MuhamedDidovic\Csrf\Csrf();
$csrf->check();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Muhamed Didovic](https://github.com/muhamed-didovic)
- [Goran Radosevic](https://github.com/gradosevic)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2541d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d87e17a6168f5ae69bddb8d0983cd73b4a176816e33309a9e6bb5d97813a7ece?d=identicon)[muhamed-didovic](/maintainers/muhamed-didovic)

---

Top Contributors

[![muhamed-didovic](https://avatars.githubusercontent.com/u/3872717?v=4)](https://github.com/muhamed-didovic "muhamed-didovic (10 commits)")[![gradosevic](https://avatars.githubusercontent.com/u/10562516?v=4)](https://github.com/gradosevic "gradosevic (1 commits)")

---

Tags

csrfmuhamed-didovic

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/muhamed-didovic-csrf/health.svg)

```
[![Health](https://phpackages.com/badges/muhamed-didovic-csrf/health.svg)](https://phpackages.com/packages/muhamed-didovic-csrf)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k26.2M709](/packages/laravel-lumen-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
