Download the PHP package wamesk/laravel-app-version-manager without Composer

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

Laravel App Version Manager

Installation

Add LaravelAppVersionManagerProvider.php in app.php.

Next step is to publish all translations, migrations and configurations. So you can change them to fit your needs.

Configuration

Translations

You can find translations here.

You can see now it has limited translations being the folders like "en"

You can create new translations by creating another folder with version-messages.php inside.

Also, you can edit existing translations if you need.

Migrations

You can find published migrations in migrations folder.

There isn't much to change there, but you might want to change id type if you are using different from ulid.

Config

You can find published config in config folder.

In there you can find these keys that have different purposes, you can see what they are for here.

You are free to change them if you need to.

app_name

This key will determine what app name will be used in response messages.

route.prefix

By default, this is api/v1 but if you are using perhaps api/v2 or maybe not versioning your api endpoints. You can change this to api or empty string.

Usage

Header

This package is about app version. So it heavily focuses on api endpoints.

For this package to work you need to be sending app-version header in each request you cover with middleware.

Middleware

This middleware needs to cover every api endpoint you are using in your app.

Like mentioned above you need to be sending app-version header with which it will be working.

How it works: This middleware is pretty simple, takes app-version header, finds version in db, then it checks if version has status deprecated. If so it returns 426 response.

Usage

Here is an example how to use this middleware. You can also register it globally, but in this example we will cover only route generating usage.

Api Endpoint

This package also comes with api endpoint.

Route url is .../app-version-check, configurable in config.

If the version sent in header app-version is old or up to date. Endpoint will respond with 200 status code.

There will be two parameters in response:

message - Basic translated message that can be used to display in app.

update - Boolean parameter that tells if there is newer versions of app.

Version History

Every change to app version using model will be recorded in app_version_history table.


All versions of laravel-app-version-manager with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 8.*|9.*|10.*
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 wamesk/laravel-app-version-manager contains the following files

Loading the files please wait ....