Code Monkey home page Code Monkey logo

nova-gridder's Introduction

Nova Gridder

This package allows customize your resource details using grid and class systems.

Example

Example

Requirements

This package requires:

  • PHP ^7.3.
  • Laravel Nova ^2.0 or ^3.0.

Installation

You can install this package in a Laravel app that uses Nova via composer:

composer require demency/nova-gridder

Usage

Add the following code in your own resource implementation:

<?php

...

class YourResource extends Resource {

    ...

    public function fields(Request $request)
    {
        return [
            ...

            // Are you ready?
            // --------------
            // 1. Use gridder method
            // 2. Set options for rendering
            // 3. See the results
            Field::make(__('Column'), 'column') // Use whatever Field
                ->gridder([
                    'labelSize' => 'w-full',
                    'contentSize' => 'w-full',
                    'panelSize' => 'w-1/5', // Use field as box in a Panel
                    'additionalLabelClasses' => 'text-center',
                    'additionalContentClasses' => 'text-center py-2',
                    'additionalPanelClasses' => '', // This remove the border-bottom per field
                ])
        ];
    }

Changelog

1.0.1

  • Now support nova 3.0.
  • Some wrong type fixed.

1.0.0

  • Recently published.

Disclaimer

This package isn't tested. Feel free to make PR with improvements.

nova-gridder's People

Contributors

zen0x7 avatar

Stargazers

Joshua Sznapstajler avatar Abdullah Al Mashmoum avatar Maher El Gamil avatar Alex avatar Sabid Barahona avatar Mark Shust avatar  avatar Rutger Broerze avatar Krot Eval avatar Toan Nguyen avatar Juan Manuel avatar Mike avatar  avatar Insolita avatar Burak Sormageç avatar Kit Burton-Senior avatar

Watchers

 avatar

nova-gridder's Issues

Do not work with relations?

I tried HasMany and nothing happening.
It would be very useful to display 2 or 3 tables of relations in one row.

[Feature Request] Show Grid Layout in Edit/Create view

Hello,

Thanks again for this plugin. Is it possible to retain the gridder formatting within the edit and create view?

NovaTabs did something similar to retain the tabs on the form views.

Thank you!

Best Regards,

Mike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.