Download the PHP package douglasanpa/active-users without Composer

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

A Laravel Package for easily retrieving a list of active users and guests that are currently online.

This is a small, simple little package for seeing who's currently online.

Installation

Install via composer with:

Setup

Sessions and Database

For now, this package only supports the 'database' type for session storage. Open your .env file and change the session driver to database:

and also make sure to publish the default session table with:

Providers and Aliases

In order to use the Active class, reference the full vendor namespace, or just import the class at the top of the file that you want to use it in. Eg:

or

This package also includes a provider and alias to make things easier. To set those up properly, open config/app.php and add this to your providers array:

and this to your aliases array:

Usage

Grabbing Most Recent Activities

Import the Active facade at the top and then do a simple query.

By default, the 'users' method will return users that have been active in the past 5 minutes. If you want to display a different timespan, use the following functions:

The functions listed above all return Eloquent Queries, so you can do anything with the results that would do with any other model:

Sorting Methods

There are a couple convenience methods for sorting results, as well:

Guests

You can also view online guests with all the same methods as users above:

Many thanks to thomastkim/laravel-online-users on which this is very heavily based.

License

This package is free software distributed under the terms of the MIT license.


All versions of active-users with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
illuminate/support Version ~5.6|~5.7|~5.8|~6.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 douglasanpa/active-users contains the following files

Loading the files please wait ....