1. Go to this page and download the library: Download inlayphp/infolists library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inlayphp / infolists example snippets
use Inlay\Infolists\Entries\IconEntry;
use Inlay\Infolists\Entries\RepeatableEntry;
use Inlay\Infolists\Entries\TextEntry;
use Inlay\Infolists\Infolist;
use Inlay\Actions\Action;
use Inlay\Schemas\Components\Section;
$details = Infolist::make('user.details')
->columns(2)
->schema([
Section::make('profile')->columns(2)->columnSpan(2)->schema([
TextEntry::make('email')
->statePath('contact.email')
->copyable(message: 'Email copied')
->suffixAction(
Action::make('verify-email')
->label('Verify email')
->icon('heroicon-o-check-badge')
->iconButton()
->url(route('users.verify-email', $user)),
),
IconEntry::make('verified')->boolean(),
TextEntry::make('balance')->money('USD'),
TextEntry::make('created_at')->date('M j, Y'),
RepeatableEntry::make('addresses')->columns(2)->schema([
TextEntry::make('street'),
TextEntry::make('city'),
]),
]),
])
->data($user->toArray());
return inertia('Users/Show', ['userDetails' => $details]);
TextEntry::make('total')
->color('success')
->size('large') // extra-small | small | medium | large
->weight('semibold') // thin … black
->fontFamily('mono') // sans | serif | mono
->tooltip('Including tax');
ImageEntry::make('attachment')
->disk('private-uploads')
->checkFileExistence(false); // still generates a temporary URL
use Inlay\Infolists\Entries\CodeEntry;
use Phiki\Grammar\Grammar;
use Phiki\Theme\Theme;
CodeEntry::make('deployment_script')
->grammar(Grammar::Shellscript)
->lightTheme(Theme::GithubLight)
->darkTheme(Theme::GithubDark)
->copyable()
->copyMessage('Script copied')
->copyMessageDuration(1500);