Download the PHP package kwhorne/askr-laravel without Composer

On this page you can find all versions of the php package kwhorne/askr-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package askr-laravel

askr-laravel

Laravel integration for the Askr application server. It wires Askr's in-binary, shared-memory services into Laravel's driver system, so a single-box app needs no Redis:

Driver What it replaces
SESSION_DRIVER=askr Redis / DB / file sessions
CACHE_STORE=askr Redis cache, counters, rate limiting, Cache::lock()
QUEUE_CONNECTION=askr Redis / DB queues
BROADCAST_CONNECTION=askr Redis pub/sub + a WebSocket server (Laravel Echo)

Durable, replicated (multi-box)

The drivers above are unchanged whether the server uses the L1 shared-memory tier (single box, ephemeral) or the durable, replicated L2 SQL Anywhere tier. Run the server built with --features sql-backend and set ASKR_QUEUE_DB / ASKR_CACHE_DB / ASKR_BROADCAST_DB to a database path (an embedded file, an embedded replica, or a sqld-managed database) to get durable jobs, a shared/edge cache, and cross-node broadcasting — no app changes.

Driver [askr] not supported

SESSION_DRIVER=askr (or CACHE_STORE/QUEUE_CONNECTION) without this package installed. The drivers come from here, not from the server:

In worker mode the failure is a 500 on every route that touches the driver, and Askr's log names it: uncaught InvalidArgumentException escaped the request handler: Driver [askr] not supported.

Why the session driver matters

Running Laravel in a long-lived worker (Octane-style, which is how Askr serves) exposes a real trap: SESSION_DRIVER=array leaks — the array handler keeps every session in the PHP heap until it hits memory_limit. The alternatives each give something up. Askr's shared-memory driver gives up nothing:

SESSION_DRIVER Fast? No heap leak? No lock? No extra server?
array ❌ (OOMs)
file
database (SQLite)
redis
askr

Measured: ~11–15k req/s with flat 8 MB per worker (sessions live in shared memory, not the heap), persisting across every worker process.

Install

The service provider is auto-discovered — no manual registration.

Configure

Add the cache/queue store definitions (or rely on the defaults):

Run

Start Askr with the matching shared-memory regions enabled:

Run queue workers in the same binary:

Notes

MIT © Knut W. Horne

Automatic page caching (askr.cache)

The server needs a response cache for this to do anything. Start Askr with --response-cache 512 (or [cache] response_slots = 512). Without it the middleware still sets its header, the server has nowhere to put the page, and nothing is cached — which looks like the middleware not working. X-Askr-Cache on the response tells you which it is: MISS/HIT means the cache is on, no header at all means it isn't.

Page caching is rare in Laravel not because it's slow to set up, but because keeping the tags right is a job nobody wants: one forgotten dependency serves stale content, so teams switch it off. Askr can watch instead.

There is no tag list. The middleware records every Eloquent model the response read (via the retrieved event) and tags the cached page with them, so $product->save() clears exactly the pages that showed that product — across every worker, immediately.

Precision while it's cheap, safety when it isn't. A cached entry holds up to 8 tags, so:

The response read It's tagged A change clears
a few models per instance (products:42) only the pages showing that product
many models per class (products) every page that listed products
more classes than fit nothing — and it isn't cached

The last row matters: Askr refuses to cache a response carrying more tags than an entry holds, rather than storing one whose invalidation silently doesn't work. A page you can't invalidate is worse than a page you didn't cache.

Creating a model clears the class tag too — a brand-new product has no page of its own to invalidate, but the listing that should now include it does.

When it declines to cache

The middleware only marks a response cacheable when it can tell the page is shared:

The server adds its own guards underneath: only anonymous requests are cacheable at all, and Set-Cookie is stripped on store.

Find out what's worth caching first

That reports the hit rate each route would reach, the PHP time it would save, and — the part that matters — whether the page was byte-identical for every visitor during the sample. Add askr.cache to the routes it calls safe.


All versions of askr-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/broadcasting Version ^11.0 || ^12.0 || ^13.0
illuminate/cache Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/queue Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kwhorne/askr-laravel contains the following files

Loading the files please wait ...