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 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

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

1936d 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

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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