Download the PHP package bradietilley/laravel-shortify without Composer

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

Laravel Shortify

A simple yet flexible implementation of a URL Shortner in Laravel.

Static Analysis Tests Laravel Version PHP Version

Introduction

Integrate your own cusom URL shortener into your Laravel App, and track who visits what!

Installation

Config and migrations should be published:

Documentation

Shortening URLs → Basic usage

Statically:

You can statically call the BradieTilley\Shortify\Shortify singleton to shorten urls:

Dependency Injection:

The BradieTilley\Shortify\Shortify singleton can be dependency injected:

Shortening URLs → Shortening with an expiry

Sometimes your short URLs should be temporary. To achieve this, provide an expiry when shortening.

Viewing an expired URL will result in a BradieTilley\Shortify\Exceptions\ShortifyExpiredException exception.

URLs → ShortifyUrl Model

The BradieTilley\Shortify\Models\ShortifyUrl model is the map between an original URL and a short URL (unique by code).

Original URL

The original URL can be fetched via the original_url property

Shortened URL

The shortened URL can be fetched via the url attribute

The ShortifyUrl model overview:

Visits ->ShortifyVisit Model

The BradieTilley\Shortify\Models\ShortifyVisit model represents a unique visit of a shortened url, tracking the user (if authenticated), IP address, and User Agent.

The ShortifyVisit model overview:

Customisation → Code Length

The code length defaults to 12, meaning the short URLs are always https://app.com/s/ followed by 12 alpha-numeric characters such as 50mqV1dfOrth.

This can be configured via the shortify.routing.code_length config variable.

Customisation → URL Path

The default is /s/{code} but in some cases this won't be what you're after.

This can be configured via the shortify.routing.uri config variable.

Customisation → URL Domain

The default is the default app domain but in some cases you may wish to use an alternative shorthand domain.

Note: You will need to register this other domain and configure the DNS as per usual -- this package does NOT provide that type of functionality.

This can be configured via the shortify.routing.domain config variable.

Customisation → Redirect Controller

The default is a rudimentary redirect that is handled by this package, but sometimes you may want to customise how the redirect is handled -- perhaps you want it to be returned in a JSON response that matches how JSON redirects are performed in your app.

This can be configured via the shortify.routing.route config variable.

Once configured, the original controller is inaccessible, and you now have full control over the handling of redirects.

Customisation → Models

As always with most Laravel packages, you can modify the models to use -- perhaps you want to track more information, add new helpers, etc. No worries.

This can be configured via the shortify.models.shortify_url and shortify.models.shortify_visit config variables which change the ShortifyUrl and ShortifyVisit models respectively.

Customisation → Turn off visitor tracking

Maybe you don't want tracking, or don't need it. Whatever the reasons are, you can disable the tracking of visits setting the shortify.feature.track_visits config variable to false.

This will prevent the shortify_urls.visit_count field from incrementing and will prevent the shortify_visits table from being populated.

Customisation → Everything else

The BradieTilley\Shortify\Shortify singleton can be replaced by another Shortify instance within your service provider. For example:

Extend Shortify:

Then register it:

Then use it:

Author


All versions of laravel-shortify with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^11.0
spatie/laravel-package-tools Version ^1.16
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 bradietilley/laravel-shortify contains the following files

Loading the files please wait ....