outhebox/nova-fields-agent

This field give the ability to hide fields from your resources table on mobile screens for a better responsive concept

v1.1 2019-12-19 07:51 UTC

This package is auto-updated.

Last update: 2022-05-29 01:47:11 UTC


README

GitHub license GitHub issues Total Downloads

Description

This field give the ability to hide fields from your resources table on mobile screens for a better responsive concept.

Screenshots

Screenshot

Installation

This package can be installed through Composer.

composer require outhebox/nova-fields-agent

Example Usage

Note: All Fields Supported "Text Field only for example".

// Important !!!
use Outhebox\NovaFieldsAgent\HasNovaFieldsAgent;

class Example extends Resource
{
    use HasNovaFieldsAgent; // Important !!!

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $requestµµ
     * @return array
     */
    public function fields(Request $request)
    {
        Text::make('ExampleField')
            ->hideFromDetailOnMobile() // Hide the field from details page on Mobile
            ->hideFromDetailOnTablet() // Hide the field from details page on Tablet
            ->HideFromIndexOnMobile() // Hide the field from index on Mobile
            ->HideFromIndexOnTablet() // Hide the field from index on Tablet
            ->sortable(),
    }
}

License

Laravel Nova Fields Agent is licensed under The MIT License (MIT) .

Donate

If you like this package, you can show your appreciation 💜 by donating any amount via Patreon to support ongoing development.