update v 1.0.7.5
This commit is contained in:
63
vendor/davejamesmiller/laravel-breadcrumbs/docs/output.rst
vendored
Normal file
63
vendor/davejamesmiller/laravel-breadcrumbs/docs/output.rst
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
Outputting Breadcrumbs
|
||||
################################################################################
|
||||
|
||||
Call ``Breadcrumbs::render()`` in the view template for each page, passing it the name of the breadcrumb to use and any additional parameters.
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
|
||||
================================================================================
|
||||
With Blade
|
||||
================================================================================
|
||||
|
||||
In the page (e.g. ``resources/views/home.blade.php``):
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
{!! Breadcrumbs::render('home') !!}
|
||||
|
||||
Or with a parameter:
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
{!! Breadcrumbs::render('category', $category) !!}
|
||||
|
||||
|
||||
================================================================================
|
||||
With Blade layouts and @section
|
||||
================================================================================
|
||||
|
||||
In the page (e.g. ``resources/views/home.blade.php``):
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
@extends('layout.name')
|
||||
|
||||
@section('breadcrumbs', Breadcrumbs::render('home'))
|
||||
|
||||
In the layout (e.g. ``resources/views/app.blade.php``):
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
@yield('breadcrumbs')
|
||||
|
||||
|
||||
================================================================================
|
||||
Pure PHP (without Blade)
|
||||
================================================================================
|
||||
|
||||
In the page (e.g. ``resources/views/home.php``):
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
<?= Breadcrumbs::render('home') ?>
|
||||
|
||||
Or use the long-hand syntax if you prefer:
|
||||
|
||||
.. code-block:: html+php
|
||||
|
||||
<?php echo Breadcrumbs::render('home') ?>
|
Reference in New Issue
Block a user