Download the PHP package radiatecode/laravel-navbar without Composer

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

Laravel Navbar

This package generates navigation/navbar for laravel application. The package also provide a build in html navigation UI, it also allows you to build your own custom navigation UI.

Sample & Usages

Note: You can(should) generate the navbar in the View Composer

Navbar In View Composer Example

In _left_nav partials

Output

Requirements

Installation

You can install the package via composer:

composer require radiatecode/laravel-navbar

Publish config file (optional)

php artisan vendor:publish --provider="RadiateCode\LaravelNavbar\NavbarServiceProvider" --tag="navbar-config"

Usage

Nav available methods

1. Header : it is use to group certain nav items

Syntax:

header(string $name, Closure $closure, array $attributes = []) : 1st arg is the name of the header, 2nd arg is a closure to add nav items under the header, 3rd is for any extra attributes (ex: icon, class etc.)

2. Add: add nav items

Syntax:

add(string $title, string $url, ?array $attributes = null, ?callable $children = null): 1st arg name of the nav item, 2nd arg is the nav url, 3rd is for any extra attributes (ex: nav icon, classes), 4th arg is for if you want to add children nav.

3. Add If: Conditionally add nav

Syntax:

addIf($condition, string $title, string $url, array $attributes = [], ?callable $configure = null): 1st arg is the condition bool or closure return bool, 2nd name of the nav, 3rd nav url, 4th extra attributes, 5th a closure for adding children nav.

4. Chidlren nav: you can add children navs

You have already noticed how we added children nav. We can also conditionally add children nav

5. Render: and the render method to get the array of nav items

Navbar UI Builder

Laravel-Navbar provide a built in navbar UI builder so that you can easily integrate the UI with your app.

Note: You can built your own custom Navbar UI by defining custom Navbar Presenter. Or, you can comes up with your own approch to show navbar.

Example: see the view composer example

Methods

Available methods of the builder

Navbar Presenter

Navbar presenter is nothing but a class which contain some functionality to generate navbar html. Under the hood the Navbar Config

Config

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-navbar with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
ext-json Version *
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 radiatecode/laravel-navbar contains the following files

Loading the files please wait ....