Download the PHP package highvertical/offline-detection without Composer

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

Laravel Offline Detection Package

This package provides real-time internet connection monitoring for Laravel applications, with features like offline detection, reconnection handling, and syncing offline data when the internet is restored.

Features

Installation

  1. Install the package via Composer (if you’re planning to publish this package, otherwise just copy the files into your Laravel project).

  2. Publish the package assets (views, config, and JS files):

  3. Optionally, you can configure the package in .env:

Usage

  1. Add the following route to your routes/web.php file to display the offline page:

  2. Add the following script to your main layout file (usually resources/views/layouts/app.blade.php or similar) to enable the offline detection feature:

  3. When users go offline, they will be redirected to /offline, and when they come back online, the page will automatically reload or display a banner indicating the restored connection.

Configuration

The configuration file config/offline-detection.php allows you to set options like:

Customization

Offline Data Synchronization

To store and sync user actions when offline, use localStorage. For example, if you want to store form data when the user is offline:


function saveOfflineData(actionData) {
    let offlineData = JSON.parse(localStorage.getItem('offlineData')) || [];
    offlineData.push(actionData);
    localStorage.setItem('offlineData', JSON.stringify(offlineData));
}

All versions of offline-detection with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.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 highvertical/offline-detection contains the following files

Loading the files please wait ....