Download the PHP package jamesyps/laravel-myriad without Composer
On this page you can find all versions of the php package jamesyps/laravel-myriad. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jamesyps/laravel-myriad
More information about jamesyps/laravel-myriad
Files in jamesyps/laravel-myriad
Package laravel-myriad
Short Description Provides a way of displaying the components available in your Laravel project
License MIT
Informations about the package laravel-myriad
Laravel Myriad
A simple pattern library package to document and display blade components.
Installation
Install via Composer:
Publish assets:
You can then visit the pattern library at https://your-app.xxx/myriad/components
Components
The primary purpose of this package is to document the components within a Laravel project. For more information on how components can be used, see the Laravel documentation.
To get started create a new component in the configured components directory, in this case let's start with a button:
Now it needs some documentation to show others how it can be used, what slots are available and what attributes can be passed through. This can be done with a blade comment and yaml front matter:
Within the preview view two buttons will now appear, one with the class btn-default
and another with a class of btn-primary
. Each one will have the text of My Button.
The front matter supports custom properties too which will be visible on the preview screen, for example if you wanted to show the current status or browser support.
You can also provide further information by adding text below the last ---
. There is full markdown support within this section so you can provide nicely formatted documentation like so:
Customisation
Myriad has been developed to be full configurable to the needs of your application and workflow.
Config
Basic customisation can be made through the config file. Use the following command to publish it:
To see what options are available you can view the source code here.
Templates
To modify the default templates publish them with the following command:
You can then find them in resources/views/vendor/myriad
.
Contracts
If you need to add or modify functionality for your app, you can swap out the default Component Repository and Component Model classes with your own.
If you are not extending the original classes, you must ensure that any new code adheres to the following contracts:
These can be found in the Contracts namespace.
All versions of laravel-myriad with dependencies
illuminate/support Version ~5.6.6|~5.7.0|~5.8.0
illuminate/view Version ~5.6.6|~5.7.0|~5.8.0
spatie/yaml-front-matter Version ^2.0