Sends a few events a moment apart, so the admin dashboard can tell whether this server lets a streamed response reach the browser as it's written, or holds it back until it's complete. Only the browser can tell: the server doesn't know what a proxy in front of it does.
Clears the cache, reporting each step as it finishes.
Not to be confused with the CreateAccessTokenController, this controller is used to authenticate a user with credentials, and return a system generated session-type access token.
Registers or unregisters the delivery-event webhook with the active mail driver's provider, so the admin never has to visit the provider dashboard.
Resolves a registration token submitted in the POST body and returns the non-sensitive fields needed to pre-populate the sign-up modal.
Returns counts of bounce/complaint events grouped by how recently they occurred. These are true event counts from the historical log, so they reflect volume over each window even after affected users fix their address.
Discussions a browser suggests as someone types in its search box, in the OpenSearch suggestions format: the query, then titles, descriptions and addresses. Only discussions the visitor can see are suggested.
Uploads the logo shown at the top of HTML emails. It's stored as PNG (or GIF when animated) rather than WebP, which many mail clients can't display.
This is directed at eager loading relationships apart from the request includes.
Stamps every API response with the current asset revision token, so a browsing client can notice when the JS/CSS it booted with has been superseded and offer the user a reload — without polling or a forced refresh.
Counts a failed login for the LoginThrottler.
Lets tinker users reference Eloquent models by their short name — e.g.
An in-shell `flarum` command that reprints the Flarum-specific context (scope variables, short-name model aliasing, docs link). This is the same information shown in the startup banner, made available on demand for once the banner has scrolled out of view. It is listed automatically by PsySH's built-in `help` command.
Base model class, building on Eloquent.
Database engine version requirements for this Flarum version.
Migration factory.
Discussions started by a member of any of the given groups, by ID or name.
Models a discussion-user state record in the database.
The Conditional extender allows developers to conditionally apply other extenders based on either boolean values or results from callable functions.
Declaring a language pack's code, title and direction in composer.json as "extra.flarum-locale" is deprecated since 2.1 and will be removed in 3.0: use code(), title() and direction() instead.
Some models, in particular Discussion and CommentPost, are intended to support a "private" mode, wherein they aren't visible unless some criteria is met. This can be used to implement anything from private discussions to post approvals.
Model visibility scoping allows us to scope queries based on the current user.
Views are PHP files that use the Laravel Blade syntax for creation of server-side generated HTML.
This exception is thrown when someone attempts to disable an extension that other enabled extensions depend on.
This exception is thrown when someone attempts to enable an extension whose Flarum extension dependencies are not all enabled.
A trait to add formatted content to a model.
The uploaded app icon. Its source is kept, so the home screen icons can be drawn again when the background colour changes.
Where the forum's logos and icons are. An image a theme sets with the Theme extender takes the place of one an admin uploaded.
Draws the favicon, app icon and splash screen files from the data of one source image.
The forum's name where its full title doesn't fit: a browser's list of search engines, or under an icon on a phone's home screen.
The files derived from an uploaded image, each named in a setting.
The logos and icons a theme sets with the Theme extender.
The forum's web app manifest, which Android and Chrome read for the name and icons of a shortcut added to the home screen. It opens the forum as an app, in a window of its own with a splash screen, unless an admin turns that off, and then in the browser.
The tags that open the forum as an app from the home screen. Only the forum gets them, and only with an app icon: without one, a phone would put a screenshot of the page on the home screen. The admin frontend opens in the browser.
Post search results.
For crawlers and feed readers that ask for /favicon.ico without reading the page. Browsers follow the page's own icon links instead.
Maintenance login view.
Served by Flarum at an address without an .xml extension, which some web server configurations, including the nginx one Flarum suggests, would otherwise only look for on disk.
Where a browser sends a search from its address bar. A browser keeps the address it was given when the forum was added, so this one stays the same whichever page is the homepage, and sends the search on to the discussion list wherever it is now.
Served by Flarum rather than as a file, so it works on any web server and stays on the forum's own domain when assets are served from elsewhere.
The OpenSearch description, which lets browsers add the forum as a search engine and suggest its discussions as someone types.
What clearing the cache actually did.
Implementation of the Laravel Application Contract, for the sake of better integration with Laravel packages/ecosystem.
An error that was caught / interpreted by Flarum's error handling stack.
A formatter to render exceptions as valid {JSON:API} error object.
Log caught exceptions to a PSR-3 logger instance.
Flarum's central registry of known error types.
A formatter for turning caught exceptions into "pretty" HTML error pages.
Handle errors using the Whoops error handler for debugging.
The "application booted" event is fired after the application has finished booting and all extension boot callbacks have been run, but before any requests have been handled.
Dispatched once a model's new icon image, or its removal, has been saved through the icon image endpoints. `$model->icon_image_path` is null when the image was removed. The change is already stored when it is dispatched: a listener that throws fails the request but doesn't undo it.
Dispatched before a model's icon image is stored or removed through the icon image endpoints, which don't run the resource's own saving hooks. A listener can throw to stop the change, or alter the image before it is stored. Check `$model` to act on one kind of model only.
For a model whose Font Awesome icon can be replaced by an uploaded image. The model's table needs a nullable `icon_image_path` string and an unsigned tiny integer `icon_image_scales` defaulting to 1.
The API surface of an icon image, for a resource whose model uses HasIconImage. Add the endpoints and fields to the resource:
Stores an image used in place of a model's Font Awesome icon (a group's or a tag's, for example). The model needs the `icon_image_path` and `icon_image_scales` columns; see the HasIconImage concern.
Raster images only: an SVG served from the forum's own domain could run script, and GD cannot read it.
An exception that has a well-known meaning in a Flarum application.
A factory class for creating frontend asset compilers.
Produces a single token representing the current state of all compiled asset revisions, so a long-lived client can detect when the assets it booted with have been superseded (e.g. after a rebuild or extension toggle).
Records asset revisions one row at a time, so several instances can record different assets at once.
Used to copy JS files from a package directory to the assets' directory.
Records which revision of each compiled asset is current, so that a URL can be cache-busted and a client can tell when what it loaded was superseded.
A view which renders a HTML skeleton for Flarum's frontend app.
Dispatched after the frontend assets have been recompiled in place (e.g. an extension was toggled or the cache was cleared), so the compiled JS/CSS now has a new revision. Lets consumers react — for example, to notify connected clients that the assets they loaded are out of date.
Caches the permission lists of group-ID sets.
Optional companion to SlugDriverInterface for drivers that can resolve many slugs in a single query. Consumers that resolve slugs in bulk (e.g. the tag filter) should prefer this when the active driver implements it, and fall back to looping SlugDriverInterface::fromSlug() otherwise.
Sends a response, streaming it only where streaming is what was asked for.
A response that reaches the browser as it's written, for work that takes a while and has something to show along the way: a step finished, a line of output, or a reply being written.
Filters an access tokens request by the token type.
Filters an access tokens request by the related user.
Catch exceptions thrown in a PSR-15 middleware stack and handle them safely.
Inspired by Illuminate\View\Middleware\ShareErrorsFromSession.
How long sessions and the tokens behind them last.
Packs PNG images into an .ico file. Neither GD nor Intervention can write one, and every browser in use reads PNG-compressed icon entries.
At least one of the given PHP extensions must be loaded, such as the PDO driver for any one of the supported databases.
Decides whether a compiled catalogue still reflects the translations this instance has been given.
Hands the translator a cache that knows which translations its catalogue was built from. See {CatalogueCache}.
Stub implementation of Laravel's Log Context Repository.
An interface for a mail service.
A historical record of a single bounce or complaint event reported by the mail provider. Unlike the flag on the user, these rows persist even after the user fixes their address, so they can be counted as true event volume.
The logo shown at the top of HTML emails.
Fired when a mail driver reports that a message to an address permanently failed to deliver (a hard bounce). Transient/soft failures do NOT fire this.
Fired when a mail driver reports that a recipient marked a message as spam (a complaint). Treated at least as seriously as a hard bounce.
An optional capability for {DriverInterface} implementations whose provider can push delivery events (bounces, complaints) to Flarum via an inbound webhook.
Reacts to bounce/complaint events by (a) logging a historical event row — which persists even after the user fixes their address — and (b) flagging every account using the address so mail can be suppressed and the state surfaced to admins.
The formatter email views are given.
The translator email views are given.
An optional add-on to {HandlesWebhooks} for drivers whose provider exposes an API to register the webhook, so an admin never has to configure it manually in the provider's dashboard.
Carries values through a formatter without letting them be parsed.
Receives inbound delivery-event webhooks (bounces, complaints) from the active mail driver's provider, verifies them, and dispatches the corresponding Flarum event so listeners can react.
The notification Alert driver only picks up notifications that implement this interface.
A notification BlueprintInterface, when instantiated, represents a notification about something. The blueprint is used by the NotificationSyncer to commit the notification to the database.
Dispatched after notification records have been inserted for a blueprint.
Models a notification record in the database.
The Notification Syncer commits notification blueprints to the database, and sends them via email depending on user preference. Where a blueprint represents a single notification, the syncer associates it with a particular user(s) and makes it available in their inbox.
A post visibility scoper that can take a fast path when every post in the query belongs to one discussion the actor is already allowed to see.
A standard comment in a discussion.
A post which indicates that a discussion's title was changed.
Posts by how they were made: `source:api`, `source:mcp,api`, `-source:mcp`.
A post that has the ability to be merged into an adjacent post.
How a post reached the forum when it was not written in the forum's own interface: through the API, an MCP client, or a channel an extension adds.
Flarum's counterpart to Illuminate's queue:pause: the upstream command type-hints the concrete QueueManager, which Flarum replaces with its own factory. The queue argument accepts `queue` or `connection:queue`; the connection defaults to the active queue connection's name.
Flarum's counterpart to Illuminate's queue:resume — see PauseCommand for why the upstream commands cannot be reused directly.
Queue stats for the database driver, read from the queue_jobs and queue_failed_jobs tables. A job is "reserved" (in-flight) once a worker has picked it up (reserved_at is set); otherwise it is pending.
Lists, retries and forgets failed jobs for the admin dashboard.
Supplies the counts shown by the admin queue dashboard widget.
Wraps the queue connection so jobs are routed onto their registered queue when they are pushed.
A filter a person adds to narrow the list they are looking at, such as a date range or a language picked on the All Discussions page, rather than a filter that asks for a different list. The list stays the same list: its mutators still apply, including pinning sticky discussions, as they do for the list without the filter.
A filter a client adds to ask about part of a list it already shows, such as Deck asking which discussions in a column have been active since a given time, rather than a filter that asks for a different list. Its presence alone doesn't stop a request counting as the unfiltered list (for example, the All Discussions page), so that list's mutators still apply.
Represents the criteria that will determine the entire result set of a query. The limit and offset are not included because they only determine which part of the entire result set will be returned.
Prepare settings for display in the client.
A settings repository decorator that allows overriding certain values.
The default driver, which returns null when no uploaded avatar exists.
An interface for an avatar driver.
Populate the `has_avatar_2x` / `has_avatar_3x` columns for users whose avatars predate variant tracking (uploaded before the columns existed, or uploaded by a future code path that didn't set them).
An interface for a display name driver.
The default driver, which returns the user's username.
Filters users by whether their email address has bounced or been marked as spam. Used via the `bounced` gambit, e.g. `is:bounced`.
Unactivated users can request a confirmation email, this throttler applies a timeout of 5 minutes between confirmation requests.
Users can request an email change, this throttler applies a timeout of 5 minutes between requests.
Limits failed logins, so passwords can't be guessed at full speed.
Logged-in users can request password reset email, this throttler applies a timeout of 5 minutes between password resets.
The `email` rule stops checking uniqueness in 3.0, when email addresses aren't unique any more (flarum/framework#4426).