Download the PHP package itstructure/laravel-detail-view without Composer
On this page you can find all versions of the php package itstructure/laravel-detail-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itstructure/laravel-detail-view
More information about itstructure/laravel-detail-view
Files in itstructure/laravel-detail-view
Package laravel-detail-view
Short Description Detail view table for laravel framework
License MIT
Informations about the package laravel-detail-view
Laravel Detail View
Introduction
This package is to displaying the model data in a Detail table.
Requirements
- laravel 5.5+ | 6+ | 7+ | 8+ | 9+ | 10+ | 11+ | 12+
- php >= 7.1
- composer
Installation
General from remote packagist repository
Run the composer command:
composer require itstructure/laravel-detail-view "~1.0.6"
If you are testing this package from a local server directory
In application composer.json
file set the repository, as in example:
Here,
../laravel-detail-view - directory path, which has the same directory level as application and contains Detail View package.
Then run command:
composer require itstructure/laravel-detail-view:dev-main --prefer-source
Publish files (Not necessary)
-
To publish views run command:
php artisan detail_view:publish --only=views
It stores view files to
resources/views/vendor/detail_view
folder. -
To publish translations run command:
php artisan detail_view:publish --only=lang
It stores translation files to
resources/lang/vendor/detail_view
folder. -
To publish all parts run command without
only
argument:php artisan detail_view:publish
Else you can use
--force
argument to rewrite already published files.
Else you can use --force
argument to rewrite already published file.
Usage
View template part
Use @detailView()
directive with config array in a blade view template.
Simple quick usage
You can simply set rows to display as string format in rowFields
array.
Note: $model
must be instance of Illuminate\Database\Eloquent\Model
.
Alternative variant without a blade directive:
Setting custom options
Rows
Simple example:
Formatters
There are the next formatter keys:
- html - is for passing a row content with html tags.
- image - is for inserting a row data in to
src
attribute of<img>
tag. - text - applies
strip_tags()
for a row data. - url - is for inserting a row data in to
href
attribute of<a>
tag.
For that keys there are the next formatters:
HtmlFormatter
ImageFormatter
TextFormatter
UrlFormatter
Also you can set formatter with some addition options. See the next simple example:
Table heads
To set column titles, you can set captionColumnConfig
and valueColumnConfig
as in example:
To hide all table row with head titles:
Complex extended example
License
Copyright © 2021-2025 Andrey Girnik [email protected].
Licensed under the MIT license. See LICENSE.txt for details.
All versions of laravel-detail-view with dependencies
laravel/framework Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0