Download the PHP package laravel-afterburner/voting without Composer

On this page you can find all versions of the php package laravel-afterburner/voting. 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 voting

Afterburner Voting Package

Team-scoped ballots and vote casting for Laravel Afterburner Jetstream.

Installation

Local Development Setup

For local development, add the package as a path repository:

Quick Install

Add the HasVoting trait to your App\Models\Team model:

Permissions

This package uses existing Afterburner template permission slugs:

The install seeder also adds package-specific permissions:

Voter units

Votes are keyed to a voter unit (morph), not a user. BallotResponse stores:

The default resolver treats each user as their own voter unit (one person, one vote).

Strata integration

Strata apps assign one vote per property/lot. Implement a custom resolver:

Register in .env:

Critical invariant

ballot_responses has a unique constraint on (ballot_id, voter_unit_type, voter_unit_id). Once a lot has voted on a ballot, changing the designated voter cannot allow a second vote for that lot.

Weighted votes (strata entitlement)

Implement Afterburner\Voting\Contracts\ProvidesWeightedVotes on your resolver and return unit entitlement per lot:

Tally and CSV/PDF exports use weighted counts when the bound resolver implements this contract, or when the team default vote weight per lot is set in voting settings.

Multi-lot owner voting

When a user is eligible to vote for two or more owned lots (not proxies) on the same ballot, the ballot page defaults to a single form that records the same choice for all listed lots. A Vote separately for each lot option switches to per-lot forms. Proxy lots always use individual forms.

Phase 3 features

Feature Config / usage
Vote revocation (withdraw vote, no re-cast) AFTERBURNER_VOTING_ALLOW_VOTE_REVOCATION=true — tombstone in ballot_vote_revocations
Scheduled open/close AFTERBURNER_VOTING_SCHEDULE_TRANSITIONS=true — queued jobs on publish + afterburner:voting:process-scheduled every minute
PDF results export Install barryvdh/laravel-dompdf, export via ?format=pdf on results export route
Weighted tally Resolver implements ProvidesWeightedVotes

Attendance tracking is intentionally deferred to a future meetings package.

Team voting settings

Team admins can configure defaults in System Settings → Voting (/teams/{team}/system-settings):

Setting Purpose
Default quorum (%) Applied to new ballots; optional
Default vote weight per lot Set to 1 when every lot counts equally; leave empty to set weight per lot in the host property register
Default vote visibility Confidential, visible after close, or visible in realtime
Allow proxy votes Team-level toggle (global kill switch in config still applies)
Lock designation during open ballots Stored preference for host apps; not enforced by this package

New ballots inherit team defaults via TeamVotingSettings. Individual ballots can override quorum and visibility on the create form.

HasVoting::votingSettings() exposes the TeamVotingSetting record for the team.

Custom electorate

For ballots with electorate = custom, register a class implementing CustomElectorateResolver:

The class is validated on boot and required when publishing custom-electorate ballots.

Voter notifications

The package fires BallotPublished but does not send email. A stub listener SendBallotPublishedVoterNotifications is registered by default. Subscribe to BallotPublished in your host app (or replace the listener) to notify eligible voters.

Routes

Team voting defaults are configured under System Settings → Voting (/teams/{team}/system-settings).

Testing

Or:

Document attachments

When laravel-afterburner/documents is installed, ballots can link to completed team documents so voters can review supporting material.

  1. Run documents migrations (includes document_links):

  2. Ensure both packages are installed in the host app (Strata already uses path repos for both).

On the ballot show and edit pages, a Supporting documents section lists attached files. Preview (eye icon) opens PDFs, images, and plain text in the browser via teams.documents.preview; download remains available when permitted.

Linking uses the documents package document_links pivot (LinkDocument / UnlinkDocument actions). Only upload_status = completed documents can be attached. Documents must belong to the same team as the ballot.

Disable integration with AFTERBURNER_VOTING_DOCUMENTS_ENABLED=false.

UI conventions

Package views use the host app's Blade button components (same as afterburner-documents):

Do not use raw bg-indigo-* classes for buttons. Do not use text labels like "Remove" on compact row actions. Republish views after UI updates:

License

MIT License — see LICENSE for details.


All versions of voting with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0
laravel-afterburner/jetstream Version ^1.0|dev-master
livewire/livewire Version ^3.5
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 laravel-afterburner/voting contains the following files

Loading the files please wait ...