Download the PHP package dancycodes/hyper without Composer

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

Laravel Hyper

Latest Version on Packagist Total Downloads Tests Code Style License PHP Version

What is Laravel Hyper?

Laravel Hyper integrates Datastar—a reactive hypermedia framework—with Laravel's development patterns, enabling you to build reactive user interfaces using server-side rendering and Blade templates.

Datastar provides the reactive signals system and frontend reactivity engine. Laravel provides the backend framework and development patterns. Hyper bridges these two technologies with Laravel-specific helpers, Blade directives, CSRF protection, validation integration, and file upload handling.

📚 Full Documentation at laravel-hyper.com

The Problem Hyper Solves

Modern web applications benefit from reactive interfaces where UI updates feel instant—users expect immediate feedback when clicking buttons, typing in search fields, or submitting forms. Achieving this responsiveness traditionally required either building separate JavaScript frontends or accepting slower full-page reloads.

Hyper offers server-driven reactivity: your Laravel application maintains control of business logic, validation, and data access while the interface updates reactively. This approach works well when your application logic belongs on the server and you want reactive UI without managing complex client-side state.

Core Technologies

Datastar (Reactive Framework)

Datastar is an independent hypermedia framework that powers the reactive behavior in Hyper applications. It provides:

All reactivity in Hyper applications comes from Datastar. When you use data-bind, data-text, or any reactive attribute, that's Datastar handling the reactivity.

Laravel (Backend Framework)

Laravel provides the server-side foundation—routing, controllers, Blade templates, validation, Eloquent, and all the patterns Laravel developers know.

Hyper (Integration Layer)

Hyper connects Datastar and Laravel with:

Server-Side Helpers:

Blade Directives:

Laravel Integration:

Custom Attributes:

Requirements

Installation

Install Laravel Hyper via Composer:

Laravel's package auto-discovery will register the service provider automatically.

Publish the JavaScript assets to your public directory:

This copies Datastar and Hyper's JavaScript files to public/vendor/hyper/js/.

Add the @hyper directive to your layout's <head> section:

The @hyper directive includes the CSRF meta tag and loads the JavaScript module.

Quick Start

Reactive State with Signals

Signals are reactive variables. When a signal's value changes, any UI element displaying that signal updates automatically. This concept comes from Datastar.

The @signals directive (Hyper) creates signals from PHP data. The data-bind and data-text attributes (Datastar) make the interface reactive.

Server Communication

Use CSRF-protected HTTP actions to communicate with your Laravel controllers:

The @postx action (Hyper) automatically includes Laravel's CSRF token. The data-error attribute (Hyper) displays validation errors.

The signals() helper (Hyper) reads signals from the request. The hyper() helper (Hyper) builds the response.

📚 Learn more at laravel-hyper.com

Updating HTML Content

Render Blade views to update specific sections of your page:

Datastar receives the rendered HTML and updates the matching element by ID.

📚 Learn more at laravel-hyper.com

Working with Signals

Signal Types

Signals come in three types, each serving different purposes:

Regular Signals (sent to server with every request):

Local Signals (stay in browser, never sent to server):

Local signals are useful for UI state that doesn't need server processing—dropdowns, accordions, modal visibility, etc.

Locked Signals (protected from client tampering):

Locked signals are stored encrypted in the session and validated on every request. If a locked signal is tampered with, Hyper throws a HyperSignalTamperedException. This feature is provided by Hyper for secure state management.

📚 Learn more at laravel-hyper.com

Creating Signals

The @signals directive offers several syntaxes:

Array syntax:

Variable syntax:

Spread syntax:

Automatic type conversion:

The @signals directive automatically converts Laravel types:

Reading Signals

In the frontend (Datastar):

The $ prefix accesses signal values in Datastar expressions.

In the backend (Hyper):

Updating Signals

From the frontend (Datastar):

From the backend (Hyper):

Validation

Laravel's validation system integrates seamlessly with signals through Hyper's signals()->validate() method:

When validation fails, Hyper automatically:

  1. Creates an errors signal with Laravel's error messages
  2. Sends it to the frontend
  3. The data-error attribute displays field-specific errors

Custom Validation Messages

All Laravel validation features work with signals:

📚 Learn more at laravel-hyper.com

File Uploads

File inputs bound with data-bind automatically encode files as base64 (Datastar behavior). Hyper provides validation rules and storage helpers for handling these base64-encoded files.

Base64 Validation Rules

Hyper provides specialized validation rules for base64-encoded files:

Available validation rules:

Dimension constraints:

Supports: min_width, max_width, min_height, max_height, width, height, ratio

Storing Files

📚 Learn more at laravel-hyper.com

Fragment Rendering

Fragments let you define reusable sections within Blade views and render them independently.

From your controller, render specific fragments:

Fragment Targeting

By default, fragments target elements by ID. You can specify custom selectors:

Merge modes (Datastar):

Navigation

Hyper provides client-side navigation features that work with Laravel routes.

Link Navigation

The data-navigate attribute (Hyper) enables client-side navigation without full page reloads.

Server-Side Navigation

Full Page Redirects

For full page reloads (not AJAX):

📚 Learn more at laravel-hyper.com

Advanced Features

Streaming

Send continuous updates to the client using Server-Sent Events:

Route Discovery

Automatically generate routes from controller methods using PHP attributes:

Enable in config/hyper.php:

Use attributes in controllers:

Conditional Logic

Use conditional methods to build responses dynamically:

JavaScript Execution

Execute JavaScript code from the server:

Datastar Attributes Reference

Hyper applications use Datastar's reactive attributes. Here are the most commonly used:

State Management

Display & Binding

Events

Event modifiers:

HTTP Actions

Hyper's CSRF-protected actions:

References

For complete Datastar documentation, visit data-star.dev.

📚 For Hyper-specific attributes and Laravel integration, visit laravel-hyper.com

Testing

Run the test suite:

Hyper includes tests covering:

What Can You Build?

Hyper works well for server-driven applications with reactive UI requirements:

Hyper maintains Laravel's server-side architecture while providing reactive user experiences.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development Setup

  1. Clone the repository
  2. Install dependencies: composer install
  3. Run tests: composer test
  4. Ensure all tests pass before submitting pull requests

Security

Security vulnerabilities should be reported privately. Please review SECURITY.md for responsible disclosure procedures.

Credits

Laravel Hyper is made possible by:

License

Laravel Hyper is open-source software licensed under the MIT license.

Support


Made with ❤️ for the Laravel community


All versions of hyper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
symfony/finder Version ^5.4.2|^6.0|^7.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 dancycodes/hyper contains the following files

Loading the files please wait ...