Download the PHP package redberryproducts/laravel-version without Composer

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

Laravel Version Badge Package

Latest Stable Version Total Downloads License

This Laravel package generates dynamic version badges that reflect the current application version or Composer version based on various conditions. The badges can be easily displayed in your application and updated automatically based on your environment.

Features

Installation

Install the package via Composer:

Publish Configuration

After installation, publish the configuration file:

This will create a config/version.php file where you can set your application version:This will create a config/version.php file where you can set your application version:

Usage

Routes

This package provides two routes for fetching version information and generating badges.

  1. Application Version: Retrieves the current version of your application.
    • URL: /application/version
    • Controller: VersionController@index
    • Returns both the environment version (from .env) and the composer version (from composer.json).
  2. Version Badge: Generates an SVG badge with dynamic content based on the requested provider (either composer or env).
    • URL: /application/version/badge?provider={composer|env}&environment={optional}
    • Controller: VersionBadgeController

Example Badge

You can include the badge in your application as an SVG by embedding the URL in your frontend or views:

Blade Views

The package also comes with two Blade files for rendering the version and badges.

  1. app.blade.php: Displays both the environment and composer versions using the badge component.

  2. badge.blade.php: Generates the SVG for the badge based on the label and version provided.

Configuration

The package uses the following environment variable in your .env file:

By default, if APP_VERSION is not set, it will display N/A.

Customization

To customize the badge, you can replace 'badge_blade' => 'version::badge', in the config/version.php file with your custom blade file.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an issue.

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature-branch.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature-branch.
  5. Open a pull request.

Credits


All versions of laravel-version with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.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 redberryproducts/laravel-version contains the following files

Loading the files please wait ...