Download the PHP package carshub/carshub-connector without Composer

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

CarsHub Connector

A Laravel package that connects your crew's website to CarsHub. It pulls pages, events, members, and cars from the CarsHub API and keeps them in a local JSON cache so your site stays fast and responsive even when the CarsHub API is unavailable.

How it works

Requirements

Installation

Publish the config file:

Add your credentials to .env:

You can find CARSHUB_API_KEY and CARSHUB_CREW_SLUG in Crew Settings → Website Sync on carshub.nl. The CARSHUB_EVENT_IMPORT_KEY is shown when the crew is created via the crews:create-system command.

Make sure Laravel's scheduler is running:

Usage

Blade / controllers

Event import (system-managed crews only)

If your crew is a system-managed crew with an CARSHUB_EVENT_IMPORT_KEY configured, you can write events directly from your application. All write methods throw CarsHubApiException on failure — wrap them in a try/catch.

After each write the local events cache (events.upcoming, events.past, and the event detail if cached) is invalidated automatically, so the next read will return fresh data.

Artisan commands

Configuration

All options are in config/carshub.php after publishing.

Key Default Description
api_key env('CARSHUB_API_KEY') API key from Crew Settings → Website Sync
crew_slug env('CARSHUB_CREW_SLUG') Your crew's URL slug
api_base_url https://carshub.nl/api CarsHub API base URL
event_import_key env('CARSHUB_EVENT_IMPORT_KEY') Event import key (system-managed crews only)
cache.path carshub Subdirectory under storage/ for JSON files
cache.ttl.pages 86400 Page cache TTL in seconds (24 h)
cache.ttl.events 3600 Events cache TTL in seconds (1 h)
cache.ttl.members 3600 Members cache TTL in seconds (1 h)
sync_on_boot true Dispatch a sync job on first boot if cache is empty
timeout 10 HTTP request timeout in seconds

Cache files

Cached data is stored as JSON files under storage/carshub/:

Each file looks like:

You can safely delete any of these files — the connector will re-fetch on next read.

Troubleshooting

Pages return null Check that CARSHUB_API_KEY and CARSHUB_CREW_SLUG are set and that the Website Sync module is enabled in your crew settings on CarsHub.

Cache is always stale Run php artisan carshub:status to see when each key was last fetched. Run php artisan carshub:sync --force to refresh immediately. Make sure schedule:run is registered in your crontab.

Events don't update Events refresh every hour. Run php artisan carshub:sync --type=events --force to refresh now.


All versions of carshub-connector with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10|^11|^12|^13
illuminate/http Version ^10|^11|^12|^13
illuminate/console Version ^10|^11|^12|^13
illuminate/contracts Version ^10|^11|^12|^13
illuminate/bus Version ^10|^11|^12|^13
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 carshub/carshub-connector contains the following files

Loading the files please wait ...