PHP code example of ferdiunal / nova-password-confirm-modal

1. Go to this page and download the library: Download ferdiunal/nova-password-confirm-modal library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ferdiunal / nova-password-confirm-modal example snippets



namespace App\Nova;

use Ferdiunal\NovaPasswordConfirmModal\NovaPasswordConfirmModal;
use Illuminate\Http\Request;
use Illuminate\Validation\Rules;
use Laravel\Nova\Fields\Gravatar;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;

class User extends Resource
{
    public static function permissionsForAbilities(): array
    {
        return Permissions::$users;
    }

    /**
     * The model the resource corresponds to.
     *
     * @var class-string<\App\Models\User>
     */
    public static $model = \App\Models\User::class;

    /**
     * The single value that should be used to represent the resource when being displayed.
     *
     * @var string
     */
    public static $title = 'name';

    /**
     * The columns that should be searched.
     *
     * @var array
     */
    public static $search = [
        'id', 'name', 'email',
    ];

    /**
     * Get the fields displayed by the resource.
     *
     * @return array
     */
    public function fields(NovaRequest $request)
    {
        return [
            ID::make()->sortable()->hideFromIndex(),
            Gravatar::make()->maxWidth(50),
            Text::make('Name')
                ->sortable()
                ->maxlength(255)
                ->enforceMaxlength()
                ->rules('