PHP code example of oriondevelops / nova-greeter

1. Go to this page and download the library: Download oriondevelops/nova-greeter 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/ */

    

oriondevelops / nova-greeter example snippets


use Orion\NovaGreeter\GreeterCard;

// ...

public function cards()
{
    return [
        // ...
        GreeterCard::make()
            ->user(name: 'John Doe', title: 'The King in the North')
            ->avatar(url: 'https://ui-avatars.com/api/?size=300&color=7F9CF5&background=EBF4FF&name=John+Doe'),
    ];
}

->message(text: 'Welcome back,')

->button(name: 'Call To Action', target: '/nova/resources/users')

->avatar(url: $avatarUrl ?? $placeholderAvatarUrl)

->verified(text: 'Verified Account')

GreeterCard::make()
    ->user(name: 'ORION', title: 'Admin')
    ->message(text: 'Welcome back,')
    ->button(name: 'See users', target: '/nova/resources/users')
    ->avatar(url: 'https://avatars.githubusercontent.com/u/39307250')
    ->width('1/2'),
bash
php artisan vendor:publish --provider="Orion\NovaGreeter\CardServiceProvider"