Skip to content
Create a shortcut to another page with a simple card.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
resources
src
.gitignore
README.md
card.png
composer.json
package.json
webpack.mix.js

README.md

Linkable Cards for Laravel Nova

Add Cards to Laravel Nova which link to another page

Latest Version on Packagist Total Downloads

Requirements

Installation

Just run:
composer require jubeki/nova-card-linkable
After this the setup will be complete and you can use the components listed here.

Cards

What ist the difference between the card types?

  • Linkable: Links to a page in your application
  • Linkable Away: Links to a page which is outside of you application
  • Linkable Router: Uses the Vue-Router to link to a page

The Design is the same for all of them and most of the options are also the same, so they will be listed here.

Default Design

Shows the Card types

Options

All options are chainable.

$linkable->url($url);
This sets the link to be used in the application

$linkable->title($title);
This sets the title of the card

$linkable->subtitle($subtitle);
This sets the subtitle of the card

$linkable->theme($background, $text);
This sets the colors of the card, default values:
$background = 'bg-white'
$text = 'text-80'

$linkable->hover($background, $text);
This sets the colors of the card while it is beeing hovered, default values:
$background = 'bg-50'
$text = 'text-80'

Linkable

Import for this component:

use Jubeki\Nova\Cards\Linkable\Linkable;

How to create an instance:

$linkable = new Linkable;

Additional options:

none

Linkable Away

Import for this component:

use Jubeki\Nova\Cards\Linkable\LinkableAway;

How to create an instance:

$linkable = new LinkableAway;

Additional options:

$linkable->target($target);
Equals to <a target="$target">

Linkable Router

Import for this component:

use Jubeki\Nova\Cards\Linkable\LinkableRouter;

How to create an instance:

$linkable = new LinkableRouter;

Options:

$linkable->url($url)
is a little bit different than the other ones:
Here you can make full use of the Vue-Router, which is uses by Laravel Nova.

Important side note:
The URL must be valid JSON!
e.g. $url = '{"name":"index", "params":{"resourceName":"users"}}'

You can’t perform that action at this time.