text: (window.webpackJsonp=window.webpackJsonp||[]).push([[12],{363:function(a,t,s){"use strict";s.r(t);var n=s(25),e=Object(n.a)({},(function(){var a=this,t=a.$createElement,s=a._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"dashboard"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#dashboard"}},[a._v("#")]),a._v(" Dashboard")]),a._v(" "),s("p",[a._v("By default no configured dashboard is included, to configure one you must first create it using the following command indicating the name of the dashboard.")]),a._v(" "),s("div",{staticClass:"language-php extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[a._v("$ php artisan lyra"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(":")]),a._v("dashboard "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n")])])]),s("p",[a._v("Once created you can find it in the 'app/Lyra/Dashboards' folder.")]),a._v(" "),s("p",[a._v("You must then register it in the configuration file.")]),a._v(" "),s("div",{staticClass:"language-php extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token double-quoted-string string"}},[a._v('"dashboard"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" \\"),s("span",{pre:!0,attrs:{class:"token package"}},[a._v("App"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Lyra"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Dashboards"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("Dashboard")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(":")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("class")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n")])])]),s("p",[a._v("Now we just need to create the different cards to show relevant information.")]),a._v(" "),s("h2",{attrs:{id:"cards"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#cards"}},[a._v("#")]),a._v(" Cards")]),a._v(" "),s("p",[a._v("To create a card, the following command must be executed, indicating the name of the card.")]),a._v(" "),s("div",{staticClass:"language-php extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[a._v("$ php artisan lyra"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(":")]),a._v("card "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n")])])]),s("p",[a._v("You will be asked what type of card you want to create. You can choose between:")]),a._v(" "),s("ul",[s("li",[s("strong",[a._v("Simple Card")]),a._v(": Displays a single value next to a title and icon.")]),a._v(" "),s("li",[s("strong",[a._v("Metric Card")]),a._v(": Displays a value next to a percentage, a title, and an icon.")]),a._v(" "),s("li",[s("strong",[a._v("Sort List Card")]),a._v(": Displays a list of values next to a title.")])]),a._v(" "),s("p",[a._v("The cards created can be found in "),s("code",[a._v("app/Lyra/Dashboards/Cards")]),a._v(".")]),a._v(" "),s("p",[a._v("To add a card to the dashboard simply import it and add a new instance of it in the array that returns the "),s("code",[a._v("dashboard")]),a._v(" function.")]),a._v(" "),s("div",{staticClass:"language-php extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("protected")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("function")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("dashboard")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(")")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v("\n  "),s("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("return")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("\n    "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("[")]),a._v("\n      "),s("span",{pre:!0,attrs:{class:"token comment"}},[a._v("// First row")]),a._v("\n      "),s("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("new")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[a._v("ExampleCard")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(",")]),a._v("\n    "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),a._v("\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(";")]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n")])])])])}),[],!1,null,null,null);t.default=e.exports}}]);