keops007 / nova-grid
Add coluns to create and Update resources
Installs: 39
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 19
Language:Vue
Requires
- php: >=7.1.0
- dev-master
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/tar-2.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.8
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/node-sass-4.14.1
- dev-dependabot/npm_and_yarn/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/fstream-1.0.12
- dev-dependabot/npm_and_yarn/lodash.mergewith-4.6.2
- dev-dependabot/npm_and_yarn/mixin-deep-1.3.2
This package is auto-updated.
Last update: 2025-03-10 12:27:37 UTC
README
This is a tool for Laravel's Nova administrator panel that allows you to create grids-based-layout for your resources. Created from the original https://packagist.org/packages/jobcerto/nova-grid
Installation
You can install the package via composer:
composer require keops007/nova-grid
Then, you will need to register the tool within the NovaServiceProvider.php
:
use Keops007\NovaGrid\NovaGrid; ... /** * Get the tools that should be listed in the Nova sidebar. * * @return array */ public function tools() { return [ // other tools new NovaGrid, ]; }
Using this tool
- After set the tool, all your fields now have access to an meta property
size
and the value is any of tailwind classes for sizes.
EXAMPLE
public function fields(Request $request) { return [ ID::make()->sortable(), Text::make('Name') ->size('w-1/3'), Select::make('Type') ->size('w-1/3') ->options(UserType::toSelectArray()), Text::make('Email') ->size('w-1/3') ->sortable() ->rules('required', 'email', 'max:254') ->creationRules('unique:users,email') ->updateRules('unique:users,email,{{resourceId}}', 'sometimes'), Password::make('Password') ->size('w-1/3') ->onlyOnForms() ->creationRules('required', 'string', 'min:6') ->updateRules('nullable', 'string', 'min:6', 'sometimes'), InlineSelect::make('Status') ->size('w-1/3') ->options(Setting::userStatuses()) ->inlineOnIndex() ->fillUsing(function ($request, $model) { $model->applyStatus($request->status); }), BelongsTo::make('Office') ->size('w-1/2') ->nullable(), ]; }
Keep in mind that this is an 15 minutes work tool, so use carefully