Download the PHP package stillat/statamic-search-report without Composer

On this page you can find all versions of the php package stillat/statamic-search-report. 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 statamic-search-report

Search Report for Statamic

Search Report for Statamic is a simple Control Panel and utility addon that allows you to log searches made on your site, and view them within Statamic's Control Panel.

How to Install

You can install Search Report for Statamic by running the following command from the root of your project:

Because Search Report for Statamic includes pre-built assets required for the Control Panel report, you will need to publish the front-end assets if they were not automatically published for you. This can be done by running the following command:

Additionally, there is some configuration and setup required to use Search Report for Statamic. Make sure to publish the configuration files before proceeding:

Setup

Search Report for Statamic stores search logs within a database, even if the rest of your site is using flat files. If you don't want to setup a large database server, you may also use SQLite. For more information on how to configure a database connection, please consider checking out Laravel's Database: Getting Started page.

Regardless of which database engine you plan to use, you will need to first publish Search Report for Statamic's migration by running the following command:

Note: If you want to change the database table name, make sure to update the search_report.database.table configuration option before running the following command.

A new file will be created for you within your site's database/migrations folder.

By default, Search Report for Statamic will utilize your site's database.default database connection. You can change this by updating the search_report.database.connection configuration option. Once you have the database setup and configured for Search Report for Statamic you may run the following command to create your new database table:

Templating

Because Statamic's search features do not emit any events, you will need to update your site's search results page in order to log searches. This can be done by inserting the {{ log_search /}} Antlers tag within your existing template:

This will instruct Search Report for Statamic to create a new log entry after a response has been sent to your site's visitor. The log_search tag will attempt to find all its required information automatically, but this behavior can also be changed.

The following parameters are available when using the log_search tag:

Name Description
term The user's search query.
index The search index used to perform the search.
site The site the search was performed within.
result_count The total number of results returned.
page The current page number, when using paginated results.

Note: In the event something has been misconfigured or is not working correctly, the log_search tag will log all exception's to your site's default log. It will not display the exception within the browser.

What Gets Logged

Search Report for Statamic does not log anything beyond the following:

Search Report for Statamic does not store each individual occurrence of a user's search, and only maintains aggregate counts of performed search terms. A search log is created for each unique site, index and term combination.

The Search Report

Once visitors have made a few searches on your site, you can view them within Statamic's Control Panel by going to "Utilities > Search Report".

The search report provides a number of fields to help you make sense of your user's searches:

Storing Searches for Authenticated Users

By default, Search Report for Statamic will not log searches made by authenticated users on your site. This can be changed by modifying the following configuration option within the config/search_report.php configuration file:

Clearing the Search Log

You may clear all entries in the search log by running the following command from the root of your project:

Note: This search-report:clear-search-term-logs command truncates the configured search term log table. Depending on how your database server is configured, the application user may not have permission to perform this operation. Under the conditions, you should consider other options for removing stored search logs.

License

Search Report for Statamic is free software released under the MIT license.


All versions of statamic-search-report with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
statamic/cms Version ^4.0 || ^5
stillat/statamic-template-resolver Version ^1.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 stillat/statamic-search-report contains the following files

Loading the files please wait ....