PHP code example of leonardo-max / new-here

1. Go to this page and download the library: Download leonardo-max/new-here 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/ */

    

leonardo-max / new-here example snippets


Action::make('export')
    ->isNew('2026-10-08', 'Download the filtered list as a spreadsheet.');

use Filament\Actions\Action;
use Filament\Actions\ActionGroup;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\SelectFilter;

// Header, row and bulk actions
Action::make('export')->isNew('2026-10-08', 'Download the filtered list as a spreadsheet.');

// Actions inside a group: the group trigger gets the beacon until it is opened
ActionGroup::make([
    Action::make('duplicate')->isNew('2026-10-08', 'Copy an order with one click.'),
]);

// Table columns and filters
TextColumn::make('tracking_code')->isNew('2026-10-08', 'See where each order is without opening it.');
SelectFilter::make('carrier')->isNew('2026-10-08', 'Filter orders by carrier.');

// Form fields, infolist entries, sections, tabs
TextInput::make('nickname')->isNew('2026-10-08', 'How the customer likes to be called.');
Section::make('Billing')->isNew('2026-10-08', 'All billing data in one place.');
Tab::make('Archived')->isNew('2026-10-08', 'Archived orders now have their own tab.');

use LeonardoMax\NewHere\Attributes\IsNew;

#[IsNew('2026-10-08', 'Sales, returns and carriers in one place.')]
class Reports extends Page
{
    // ...
}

Action::make('export')->isNew(
    since: '2026-10-08',
    hint: 'Now with charts.',
    title: 'Export, reimagined',
    key: 'export.v2',
    until: '2026-12-31',
);

Action::make('duplicate')
    ->isNew('2026-10-08', 'Copy an order with one click.');

NewHerePlugin::make()->backdrop(false);

NewHerePlugin::make()->locale('pt_BR');

NewHerePlugin::make()->locale(fn (): ?string => auth()->user()?->locale);

Action::make('export')->isNew('2026-10-08', __('orders.hints.export'));

use LeonardoMax\NewHere\NewHerePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(
            NewHerePlugin::make()
                ->expiresAfterDays(45)
                ->maxPerPage(2)
                ->openFirstHintAutomatically(false)   // only beacons until clicked
                ->backdrop(false)                     // no blur, never block the page
                ->locale('es')                        // or a closure, per user
                ->ignoreFeaturesOlderThanUser(false)  // show the past to newcomers too
                ->enabled(fn(): bool => ! session()->has('impersonator')),
        );
}

return [
    'panels' => '*',                         // or ['admin'], or false to register by hand
    'expires_after_days' => 30,
    'max_per_page' => 3,
    'open_first_hint_automatically' => true,
    'backdrop' => true,                      // focus mode
    'locale' => null,                        // null = app locale
    'ignore_features_older_than_user' => true,
    'user_created_at_attribute' => 'created_at',
    'table' => 'new_here_seen',
];

use LeonardoMax\NewHere\NewHere;

app(NewHere::class)->forget($user);  // the user will see every active hint again

use Illuminate\Support\Facades\Date;

Date::setTestNow('2026-10-08');

livewire(ListOrders::class)->assertSeeHtml('data-new-here=');
bash
php artisan new-here:list            # every marker: scheduled / active / expired
php artisan new-here:list --expired  # the ones you can delete
php artisan new-here:list --json     # for scripts and agents
bash
php artisan vendor:publish --tag=new-here-translations   # lang/vendor/new-here/{locale}/new-here.php
bash
php artisan vendor:publish --tag=new-here-config