Giter Site home page Giter Site logo

lotuashvili / filament-modules Goto Github PK

View Code? Open in Web Editor NEW

This project forked from savannabits/filament-modules

0.0 0.0 0.0 727 KB

Integration of Filament Admin to nWidart/laravel-modules: Create Admin panels for each Laravel Module

Home Page: https://filamentphp.com/plugins/laravel-modules

License: MIT License

PHP 100.00%

filament-modules's Introduction

Tests Styling Laravel v9.x Filament v3.x PHP 8.1 Packagist

Modules is a FilamentPHP Plugin to enable easy integration with nwidart/laravel-modules

NB: These docs are for v3, which only supports Filament 3. If you are using Filament v2, see the documentation here to get started.

Installation

Requirements:

  1. Filament >= 3
  2. PHP >= 8.1
  3. Laravel >= 9.0
  4. Livewire >= 3.0
  5. nwidart/laravel-modules >=10.0

Installation

composer require coolsam/modules

Usage

In this guide we are going to use the Blog module as an example

Create your laravel module:

If the module that you want to work on does not exist, create it using nwidart/laravel-modules

php artisan module:make Blog # Create the blog module

Generate a new Panel inside your module

php artisan module:make-filament-panel admin Blog # php artisan module:make-filament-panel [id] [module]

If none of the two arguments are passed, the command will ask for each of them interactively. In this example, if the Panel id passed is admin and the module is blog, the command will generate a panel with id blog::admin. This ID should be used in the next step when generating resources, pages and widgets.

Generate your resources, pages and widgets as usual, selecting the panel you just created above.

From here on, use filament as you would normally to generate resources, Pages and Widgets. Be sure to specify the --panel option as the ID generated earlier. If the --panel option is not passed, the command will ask for it interactively.

# For each of these commands, the package will ask for the Model and Panel.
php artisan make:filament-resource
php artisan make:filament-page
php artisan make:filament-widget
# The Model and Panel arguments are passed inline
php artisan make:filament-resource Author blog::admin
php artisan make:filament-page Library blog::admin
php artisan make:filament-widget BookStats blog::admin

All Done! For each of the panels generated, you can navigate to your module-path/panel-path e.g blog/admin to acess your panel and links to resources and pages.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

filament-modules's People

Contributors

askippers avatar coolsam726 avatar dependabot[bot] avatar github-actions[bot] avatar husam-tariq avatar lotuashvili avatar marco76tv avatar

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.