Download the PHP package sukohi/fox-tail without Composer

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

FoxTail

A Laravel package to manage routes user accessed. (L5.4+)

Installation

Execute the next command.

composer require sukohi/fox-tail:1.*

Set the service provider in config/app.php.

'providers' => [
    ...Others...,
    Sukohi\FoxTail\FoxTailServiceProvider::class,
]

Also alias

'aliases' => [
    ...Others...,
    'FoxTail'   => Sukohi\FoxTail\Facades\FoxTail::class,
]

Then execute the next commands.

php artisan vendor:publish

Now you have config/fox_tail.php.

Definition

Preparation

(Middleware)

You need to set FoxTailMiddleware in \App\Http\Kernel.php like so.

protected $routeMiddleware = [
    ...Others...,
    'fox_tail' => \Sukohi\FoxTail\Middleware\FoxTailMiddleware::class
];

And also in routes/web.php

Route::middleware(['fox_tail'])->group(function(){

    Route::get('/my/page/1', 'HomeController@mypage_1')->name('my-page-1');
    Route::get('/my/page/2', 'HomeController@mypage_2')->name('my-page-2');
    Route::get('/my/page/3', 'HomeController@mypage_3')->name('my-page-3');

});

In this case, FoxTail watches /my/page/1, /my/page/2 and /my/page/3.
Then, it will keep Tail in session.

(Config)
In config/fox_tail.php, you can set Story which means user's access history.
See the file for the details.

Usage

Check if Story you set in the config file matches.

$story_name = 'how_much';

if(\FoxTail::isStory($story_name)) {

    echo 'Match!';

}

Get all Tails

$tails = \FoxTail::getTails();   // Laravel Collection

Get a Tail

$tail = \FoxTail::getTail($tail_name);
echo $tail->method;
echo $tail->url;
echo $tail->full_url;
print_r($tail->parameters); // Array

// or

echo \FoxTail::getMethod($tail_name);
echo \FoxTail::getUrl($tail_name);
echo \FoxTail::getFullUrl($tail_name);
print_r(\FoxTail::getParameters($tail_name));   // Array

Check if FoxTail has a Tail or not

$tail_name = 'about_us';

if(\FoxTail::has($tail_name)) {

    echo 'Has it!';

    $tail = \FoxTail::getTail($tail_name);

}

Check if the previous Tail name

$tail_name = 'about_us';

if(\FoxTail::isPrevious($tail_name)) {

    echo 'That is right!';

}

Get Tail and Tail name by step

echo \FoxTail::getTailNameByStep();    // Current tail
echo \FoxTail::getTailNameByStep(1);    // The previous tail tail

print_r(\FoxTail::getTailByStep());    // Current tail by step
print_r(\FoxTail::getTailByStep(1));    // The previous tail by step

License

This package is licensed under the MIT License.

Copyright 2017 Sukohi Kuhoh


All versions of fox-tail with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ~5.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 sukohi/fox-tail contains the following files

Loading the files please wait ....