PHPackages                             fliq/ipfs-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fliq/ipfs-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fliq/ipfs-laravel
=================

:package\_description

v0.1.0(3y ago)515[1 issues](https://github.com/fliqnft/ipfs-laravel/issues)MITPHP

Since Aug 4Pushed 3y agoCompare

[ Source](https://github.com/fliqnft/ipfs-laravel)[ Packagist](https://packagist.org/packages/fliq/ipfs-laravel)[ Docs](https://github.com/fliq/ipfs-laravel)[ RSS](/packages/fliq-ipfs-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

IpfsLaravel
===========

[](#ipfslaravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b1de9f08a3cb93cbae89b46d01cdde2ba9518a6a0980674ed65c73bc987d5ee8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c69712f697066732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fliq/ipfs-laravel)[![Total Downloads](https://camo.githubusercontent.com/57679f2516972e84755d1d793c2dd7fa9aa0f94f04da275710aefece16bde548/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666c69712f697066732d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fliq/ipfs-laravel)[![Build Status](https://camo.githubusercontent.com/ddc28eb9bf645a7adc8abf6b9d41137136ba53f1a18e3f5aa96909631648a458/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666c69712f697066732d6c61726176656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/fliq/ipfs-laravel)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

Interact with IPFS in Laravel.

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

[](#installation)

Via Composer

```
composer require fliq/ipfs-laravel
```

Usage
-----

[](#usage)

Basic usage

```
$cid = Ipfs::add('Hello, IPFS')->first()['Hash'];

Ipfs::get($cid); // Hello, IPFS
```

### Configuration

[](#configuration)

To publish your config run:

```
php artisan vendor:publish --tag=ipfs.config
```

### Adding Files

[](#adding-files)

You can flexibly add new files to IPFS using the `add()` method. You can add files from a string, a resource or an array, arrays will be json encoded. Use array keys to specify files names.

The second argument is an array of options more information on the [IPFS documentation.](https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-add)The `wrap-with-directory`option will create an extra CID for the directory.

```
$resource = fopen('path/to/file.mp3');

$results = Ipfs::add([
    'hello.txt' => 'Hello, IPFS!',
    'file.mp3' => $resource,
    'meta.json' => [
        'name' => 'Hello',
        'properties' => [...],
    ],
], ['wrap-with-directory' => true]);

$cid = $results->last()['Hash'];

Ipfs::get("{$cid}/hello.txt"); // Hello, IPFS!
```

### Retrieving files

[](#retrieving-files)

You can retrieve files using the `cat()`, `get()`, and `json()` methods.

- `cat()`
    - Returns a [StreamInterface](https://docs.guzzlephp.org/en/stable/psr7.html#streams)
- `get()`
    - returns a string
- `json()`
    - returns a json decoded array

```
$stream = Ipfs::cat($cid);

$str = Ipfs::get($cid);

$array = Ipfs::json($cid);
```

### Asynchronous requests

[](#asynchronous-requests)

Use the `async()` method to make asynchronous requests.

Async requests return [Promises](https://docs.guzzlephp.org/en/stable/quickstart.html?highlight=settle#concurrent-requests)

```
Ipfs::async()->add($file)->then(function(array $results) {
    $results[0]; // do something
});

// or do multiple requests.
$ipfs = Ipfs::async();

$promises = [
    $ipfs->get($cid1),
    $ipfs->get($cid2),
];

$results = GuzzleHttp\Promise\Utils::unwrap($promises);
```

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Christian Pavilonis](https://github.com/ChristianPavilonis)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf7ca57075751c1182b311e5747c864dd4a4ab497073d10b51007a51cd573284?d=identicon)[ChristianPav](/maintainers/ChristianPav)

---

Top Contributors

[![ChristianPavilonis](https://avatars.githubusercontent.com/u/16183252?v=4)](https://github.com/ChristianPavilonis "ChristianPavilonis (6 commits)")

---

Tags

laravelweb3IpfsLaravel

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/fliq-ipfs-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/fliq-ipfs-laravel/health.svg)](https://phpackages.com/packages/fliq-ipfs-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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