Download the PHP package seblhaire/menuandtabutils without Composer

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

Menu and Tab Utils

By Sébastien L'haire

A Laravel library to to build menus and tabs navigation utilities, based on Boostrap 5 CSS Framework. Package demo available here.

Installation

  1. install package

composer require seblhaire/menuandtabutils

  1. Composer will automatically link the package with Laravel. But you still can explicitly add provider and facade to your config/app.php:

Javascript and stylesheets

On a webpage, every JS library and CSS stylesheets can be linked separately. If you choose this classical way, first download and install Bootstrap. Then publish package files as explained above and put following tags in your template:

Websites often use many libraries and stylesheets, and browsers must download many files before the site can be rendered properly. Modern websites come with a single compressed JavaScript file which concatenates necessary scripts; same principle for stylesheets. With Laravel you can use Laravel Mix to compile files.

Use NPM package manager : npm install bootstrap

Then your js source file should be something like this:

For your stylesheet:

Config files

Accessible through

These default values are used by tools in next sections. In case you need to change default values, use command php artisan vendor:publish and chose the appropriate package in the list. Then config files will be available in file config/vendor/seblhaire/.

MenuUtils

This simple helper assigns a <ul class="nav"> menu to a variable.

Parameters:

Define menu elements

Here are the details to build your navigation menu in menu parameter.

Array keys are used for menu element id. Values are in a sub-array.

Usage

In your controller, pass the result to a variable:

$menu = MenuUtils::init('myid', [...]);

If current parameter is not defined in parameters, you can use this method:

$menu->setCurrent('myid')

Note that item should not be a dropdown menu element. Then pass this variable to a view:

And in your Blade template, insert your variable at the appropriate line:

{!! $menu !!}

A page can have several menus. In this case, assign each menu to a different variable.

BreadcrumbUtils

This simple helper assigns a <nav aria-label="breadcrumb"> menu to a variable.

Parameters:

Define menu elements

Here are the details to build your navigation menu in menu parameter.

Array keys are used for menu element id. Values are in a sub-array.

Usage

In your controller, pass the result to a variable:

$breadcrumb = BreadcrumbUtils::init('myid', [...]);

Current element is always the last one. <Then pass this variable to a view:

And in your Blade template, insert your variable at the appropriate line:

{!! $breadcrumb !!}

A page can have several breadcrumbs. In this case, assign each menu to a different variable.

TabUtils

This helper builds the code for tabs and tab contents.

Parameters:

Define tab elements

Here are the details to build your tabs in tabs parameter.

Array keys are used for menu element id. Values are in a sub-array.

Usage

In your controller, pass result to a variable:

$tabs = TabUtils::init('myid', [...]);

If current parameter is not defined in parameters, you can use this method:

$tabs->setCurrent('myid')

Then pass this variable to a view:

And in your Blade template, insert your variable at the appropriate line:

{!! $tabs !!}

A page can have several tabs sets. In this case, assign each tab set to a different variable.


All versions of menuandtabutils with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/http Version ^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 seblhaire/menuandtabutils contains the following files

Loading the files please wait ....