Download the PHP package dewsign/nova-navigation without Composer

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

Navigation/Menu manager for Laravel Nova

Installation

composer require dewsign/nova-navigation

php artisan migrate

Usage

To get started, you will need to create your first Navigation area. E.g. Header or Footer navigation. You are free to structure the files as you wish or you can use the conventions from the examples if you prefer.

We simply use the default Nova folder to register our new navigation as it will load automatically.

The $zone is used to differentiate the various navigation areas in the database and code and avoids requiring new tables for each new navigation area.

Your new navigation zone will now be available within Nova, with the default custom link item as the only option.

Outputting the navigation (Blade)

Navigation Blade Directive

A blade directive is included to render navigation zones primarily through views. A default unordered list view is included and can be published from the package.

Inside your blade view template or layout ...

This will render all navigation items recursively using the default view. To create a custom view you can make a new blade view in resources/views/vendor/nova-navigation/zone//my-zone.blade.php.

You can use the default view as a template.

You will notice that it renders the same view for each level of navigation nested within the parent item. If you don't want this you will need to manually loop through the child items. You can access any sub-items through the navigations relationship.

The view property renders the assigned blade view for the navigation item type. The default custom item view can be published and modified through the vendor views resources/views/vendor/nova-navigation/custom.blade.php

If you don't want to render the navigation item's default view, you can manually build an inline view and use the label and action properties.

Link Types

The packages attempts to determine the type of link entered and returns this on the item through the linkType attribute. You can access this within the view using $item->linkType. This can be useful for adding icons to links for example.

Type Description
mailto An email link
tel A telephone link
download A link pointing to a download. You can customise the file extensions which are treated as downloads in the config.
external A link pointing off-site
internal A link pointing to a URL within your site

Extending

You can create your own navigation item types by creating a couple of new files and loading them in. This is useful for making your content types available as selectable navigation items instead of manually typing in custom URLs. As an example, if you have a Blog and want the user to be able to select an article or category to link to.

You will need:

Next you need to tell the system how you want to render the category navigation item. Create a new view at the location specified in the Model (in this example resources/views/vendor/nova-navigation/category.blade.php). Or you can set the view in the model to the default nova-navigation::custom if you simply want to render the same layout for all navigation items.

$model references the Category Model we created. To access the actual blog category you can refer to the relationship $model->category if you wanted to include additional details in your view. E.g.

Finally, load the new navigation item through the novanavigation config

User can now add a Category navigation item and select an existing category to link to. The benefit is that when the category changes, the navigation item also reflects these.

Hyperlinks Repeater Blocks

If you are using Nova Repeater Blocks to build out your content, you may want to include a repeater block which acts like a navigation zone to add inline links. Add the included NrbHyperlinks for your repeater blocks.

This will render each navigation item using their respective views. The wrapper for each item can be customised by creating new templates in the views/vendor/nova-navigation/hyperlinks directory. You can publish and modify the default if required.


All versions of nova-navigation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version >=5.0.0
maxfactor/support Version ^2.0.0
benjaminhirsch/nova-slug-field Version ^1.0
silvanite/nova-field-cloudinary Version ^1.0
dewsign/nova-repeater-blocks Version ^1.3.3
epartment/nova-dependency-container Version ^1.1
silvanite/brandenburg Version ^1.0
silvanite/nova-field-hidden Version ^1.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 dewsign/nova-navigation contains the following files

Loading the files please wait ....