Ezadev Admin
  • Welcome Cah
  • Ezadev Doc
    • Home
      • Documentations
        • Installation
        • Quick Start
        • Ezadev Admin Commands
        • Configuration
        • Layout
        • Content Message
        • Custom Authentication
        • Custom Chart
        • Custom Navbar
        • Data Form
        • Model Form
          • Form Callback
          • Field Management
          • Form Field
          • Form Init
          • Form Upload
          • Validation
        • Grid
          • Grid Actions
          • Grid Column
          • Column Filter
          • Column Attribute
          • Custom Actions
          • Custom Tools
          • Export
          • Grid Filters
          • Header and Footer
          • Hotkeys
          • Grid Init
          • Inline Edit
          • Quick Create
          • Quick Search
          • Total Row
        • Detail View
          • Custom Detail
          • Fields
          • Relationship
        • Tree View
        • Permissions
        • Widgets
  • Dokumentasi Api e-Repository
Powered by GitBook
On this page
  • Insert a divider
  • Modify the display
  • image
  • file
  • link
  • label
  • badge
  • using
  1. Ezadev Doc
  2. Home
  3. Documentations
  4. Detail View

Fields

Insert a divider

If you want to add a divider between the fields:

$show->divider();

Modify the display

Modify the display content as follows

$show->title()->as(function ($title) {
    return "<{$title}>";
});

$show->contents()->as(function ($content) {
    return "<pre>{$content}</pre>";
});

Here are a few common display style methods implemented by the as method:

image

The content of the field avatar is the path or url of the image, which can be displayed as an image:

$show->avatar()->image();

The parameters of the image() method are referenced to Field::image()

file

The content of the field document is the path or url of the file, which can be displayed as an file:

$show->avatar()->file();

The parameters of the file() method are referenced to Field::file()

link

The content of the field homepage is a url link that can be displayed as an HTML link:

$show->homepage()->link();

The parameters of the link() method are referenced to Field::link()

label

Show the contents of the field tag as label:

$show->tag()->label();

The parameters of the label() method are referenced to Field::label()

badge

Show the contents of the field rate as badge:

$show->rate()->badge();

The parameters of the badge() method are referenced to Field::badge()

using

If the value of the field gender is f, m, it needs to be displayed with Female and Male respectively.

$show->gender()->using(['f' => 'Female', 'm' => 'Male']);
PreviousCustom DetailNextRelationship

Last updated 3 years ago