Giter Club home page Giter Club logo

howto-filament's Introduction

howto-filament

composer create-project laravel/laravel .
composer require filament/filament:"^3.0-stable" -W
php artisan filament:install --panels

ingresa el nombre del panel

[configura el .env]

composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan optimize:clear
php artisan migrate
composer require bezhansalleh/filament-shield

Add the Spatie\Permission\Traits\HasRoles trait to your User model(s):

use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use HasRoles;

    // ...
}

Publish the config file then setup your configuration:

php artisan vendor:publish --tag=filament-shield-config

Register the plugin for the Filament Panels you want

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            \BezhanSalleh\FilamentShield\FilamentShieldPlugin::make()
        ]);
}

Now run the following command to install shield:

php artisan shield:install

You can install the package via composer:

composer require 3x1io/filament-user

Publish Translation and config

php artisan vendor:publish --tag="filament-user-config"
php artisan vendor:publish --tag="filament-user-translations"

and now clear cache

php artisan optimize:clear

Publish Resource you can publish the resource to your project

php artisan filament-user:publish
composer require rappasoft/laravel-authentication-log
composer require tapp/filament-authentication-log:"^3.0"
php artisan vendor:publish --provider="Rappasoft\LaravelAuthenticationLog\LaravelAuthenticationLogServiceProvider" --tag="authentication-log-migrations"
composer require torann/geoip
php artisan migrate
php artisan vendor:publish --provider="Rappasoft\LaravelAuthenticationLog\LaravelAuthenticationLogServiceProvider" --tag="authentication-log-views"
php artisan vendor:publish --provider="Rappasoft\LaravelAuthenticationLog\LaravelAuthenticationLogServiceProvider" --tag="authentication-log-config"
php artisan vendor:publish --tag="filament-authentication-log-translations"
php artisan vendor:publish --tag="filament-authentication-log-config"

#Using the Resource Add this plugin to a panel on plugins() method. E.g. in app/Providers/Filament/AdminPanelProvider.php:

use Tapp\FilamentAuthenticationLog\FilamentAuthenticationLogPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentAuthenticationLogPlugin::make(),
            //...
        ]);
}

That's it! Now you can see the Authentication Log resource on left sidebar.

You must add the AuthenticationLoggable and Notifiable traits to the models you want to track.

use Illuminate\Notifications\Notifiable;
use Rappasoft\LaravelAuthenticationLog\Traits\AuthenticationLoggable;
use Illuminate\Foundation\Auth\User as Authenticatable;
 
class User extends Authenticatable
{
    use Notifiable, AuthenticationLoggable;

    use HasRoles;
}

editar config/geoip.php: 'cache_tags' => [],

Erores:

This cache store does not support tagging. editar .env cambiar CACHE_DRIVER a CACHE_DRIVER=Array

howto-filament's People

Contributors

bredecl avatar

Watchers

 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.