Download the PHP package dericktan/counter without Composer

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

Hit Counter for Laravel 5.*

Installation

Run the following command:

Add the following to your config\app.php Service Providers

Add the following to your config\app.php Facades

Then run the following:

Set Cookie Name in Laravel env Config file

How to Use

Regular pages

Just add Counter::showAndCount('home') ( for blades uses {{ Counter::showAndCount('home') }} ). Change home to a unique name for the page you are working with.

Dynamic pages

For dynamic pages, such as user profiles, or job listings etc you may provide a dynamic element like this Counter::showAndCount('user-profile', $user->id) ( for blades use {{ Counter::showAndCount('user-profile', $user->id) }} )

Change user-profile to a unique name for the page you are working with.

Number output is already formatted. So 3000 visitors will render as 3,000

If you have records on a page but do not want to count visiting the page displaying the records as a hit on the record itself then change showAndCount to just show. Example Counter::show('job-listings', $job->id) ( for blades use {{ Counter::show('job-listings', $job->id) }} )

You may get all hits for every page on the entire site with Counter::allHits() ( for blades use {{ Counter::allHits() }} ). To specify a day constraint, like only all hits for the past 30 days then do Counter::allHits(30) (for blades use {{ Counter::allHits(30) }} ).

If you would just like to process a hit for a page without displaying anything then just use Counter::count('user-profile', $user->id). Works the same as all previous examples for both static and dynamic pages, blade is the same syntax. Useful for counting hits for a page without letting everyone see.

Enjoy!

Extra

This package lets you see hit counts for specific pages/objects as well as an overall site hit count. It also uses a uniquely generated cookie (fallback to IP) to give a more accurate reading. Nice package for the pro-anonymous people :)

Pull requests are welcome.


All versions of counter with dependencies

PHP Build Version
Package Version
Requires ramsey/uuid Version ^4.0
illuminate/support Version ^7.0
illuminate/database Version ^7.0
php Version >=7.2
jaybizzle/crawler-detect Version 1.*
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 dericktan/counter contains the following files

Loading the files please wait ....