Download the PHP package axn/laravel-stepper without Composer

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

Laravel Stepper

Package that let you create a progress visualization tool step by step (stepper).

Installation

To install Laravel Stepper as a Composer package to be used with Laravel 5, simply run:

Once it's installed, the package is automatically registered via Artisan command package:discover (Laravel >=5.5). If not, you must register the service provider in config/app.php by adding this line in providers section:

Usage

The stepper is going to be used on several pages. There might be several steppers per application, that's why a stepper has to be defined in a dedicated class:

What's important about that class :

Then, we can inject this class into controller's methods :

Because the class is injected by the IoC container, it's instanciated and the register() is automatically called. After that it's necessary to precise to the stepper which step is the current one : $stepper->setCurrentStepName('step 3'). Then the rendering of the stepper will be transmitted to the view in which you can simply put : {!! $stepper !!}.

Personalize the template

Change the template

This package provides several templates. By default, the template "default" is used. To use the template "arrows", you need to add to the stepper class the name of the template to use:

That's it!

Of course, in a very classical way, you can use any view of the template system. For example, to use the template resources/views/partials/steppers/custom.blade.php, put the following code in your class:

Personalize a template

All provided templates are more examples to understand how to use the package rather than production templates. For example, CSS styles are embedded in templates, which is not a good practice.

It's possible to start from one of thoose templates provided with the package and to modify them. For that, you have to publish templates, then edit them.

To publish all templates, use the following command:

After this step, you'll find all templates in resources/views/vendor/stepper/. It will be very easy to edit them depending on your needs.

Methods in templates

To personalize your templates, different methods are accessible. Here is the list:

Stepper class

{{ $stepper->getStep($stepName) }} return a step, instance of StepInterface, given the name of a step

{{ $stepper->getCurrentStep($stepName) }} return the instance of the current step

{{ $stepper->getPrevStep($stepName) }} return the instance of the previous step

{{ $stepper->getNextStep($stepName) }} return the instance of the next step

{{ $stepper->stepExists($stepName) }} get if a given step with it's name is existing

{{ $stepper->getNumSteps() }} get the total number of steps

{{ $stepper->getCurrentStepName() }} get the name of the current step

The stepper object implements the Iterator's interface, so it's possible to loop easily on it. Every loop is returning an instance of StepInterface implemented by the Step class.

Step class (StepInterface implementation and more if you wish)

{{ $step->getName() }} return the name associated to the step

{{ $step->getUrl() }} return the URL associated to the step

{{ $step->getRoute() }} return the route associated to the step

{{ $step->getPosition() }} return step's position

{{ $step->getTitle() }} return the title associated to the step

{{ $step->getDescription() }} return the description associated to the step

{{ $step->isCurrent() }} return if it's current step or no

{{ $step->isPassed() }} return if the step is in the past

{{ $step->isFirst() }} return if it's the first step

{{ $step->isLast() }} return if it's the last step

Personalize classes

Because the concrete class of our stepper is a child of the abscract stepper class, it's possible to override properties and methods of that stepper class.

It's also possible to override the Step class very easily by implementing the StepInterface interface and putting in the stepper class the name of the Step class to use:


All versions of laravel-stepper with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.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 axn/laravel-stepper contains the following files

Loading the files please wait ....