PHPackages                             robertseghedi/laravel-autofetcher - 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. [Caching](/categories/caching)
4. /
5. robertseghedi/laravel-autofetcher

ActiveLibrary[Caching](/categories/caching)

robertseghedi/laravel-autofetcher
=================================

This is a fresh Laravel plugin which gets data from your database, caches it and gets it ready for displaying on your amazing page. It is really simple to use, so it might not puzzle you.

1.0.3(5y ago)07MITPHP

Since Apr 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/robertseghedi/laravel-autofetcher)[ Packagist](https://packagist.org/packages/robertseghedi/laravel-autofetcher)[ RSS](/packages/robertseghedi-laravel-autofetcher/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Laravel Autofetcher
===================

[](#laravel-autofetcher)

The most powerful and efficient Laravel plugin for proper data-fetching

This is a fresh Laravel plugin which gets data from your database, caches it and gets it ready for displaying on your amazing page. It is really simple to use, so it might not puzzle you.

Instalation
-----------

[](#instalation)

First, you have to install the package using composer in your project root folder:

```
composer require robertseghedi/laravel-autofetcher

```

Then, you have to add the provider to your `config/app.php` like that:

```
// your providers

RobertSeghedi\Autofetcher\AutofetcherProvider::class,
```

Information
-----------

[](#information)

Command nameWhat it doesAutofetch::database($table, $time - in seconds)Lists all the results from the table you mentionAutofetch::result($table, $type (first/last), $time - in seconds)Lists only the first/last result from the table you mentionAutofetch::select($table, $selected\_fields, $time - in seconds)Lists all the results from the table you mention, but only the mentioned fieldsAutofetch::top($table, $orderby, $number\_of\_results, $time - in seconds, $type)Lists all the results from the table you mention, but only the mentioned fieldsAutofetch::lazy($table, $orderby, $number\_of\_results, $time - in seconds)Lazy-lists all the results from the table you mention, but only as much results as you mentionedUsage
-----

[](#usage)

Now you can start using the package.

### 1. Include it in your controller

[](#1-include-it-in-your-controller)

```
use RobertSeghedi\Autofetcher\Models\Autofetch;
```

### 2. Start extracting fresh data

[](#2-start-extracting-fresh-data)

```
public function fetch_table($table = null)
{
    $x = Autofetch::database($table);
    return $x;
}
```

```
public function fetch_top_donators($table = null)
{
    $x = Autofetch::top($table, 'donated_money', 10, 1800, 'public');
    return $x;
}
```

- **$table** - the table's name that you want to extract data from
- **'donated\_money'** - the order-by-field's name
- **10** - number of results (so the above code will return a top 10)
- **1800** - the number of seconds for which the data will be cached
- **'public'** - the public option is for efficient data-caching &amp; displaying the data on a public website which doesn't require refresh-updated data. If you use the public option, your user-cached data won't refresh until the specified time is up. If you use the private option, your user-cached data will refresh instantly. The private option is good if you are developing an admin dashboard or a limited-access app.

### 3. Display it as you wish

[](#3-display-it-as-you-wish)

Follow this package for future updates

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

1839d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54363288?v=4)[Robert Seghedi](/maintainers/robertseghedi)[@robertseghedi](https://github.com/robertseghedi)

### Embed Badge

![Health badge](/badges/robertseghedi-laravel-autofetcher/health.svg)

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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