PHP code example of manzadey / laravel-orchid-storage-logs

1. Go to this page and download the library: Download manzadey/laravel-orchid-storage-logs 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/ */

    

manzadey / laravel-orchid-storage-logs example snippets


use Illuminate\Support\Facades\Route;
use Manzadey\LaravelOrchidStorageLogs\Screens as StorageLogScreens;
use Tabuna\Breadcrumbs\Trail;

Route::name('platform.storage-logs.')
    ->prefix('storage-logs')
    ->group(static function() {
        Route::screen('', StorageLogScreens\StorageLogListScreen::class)
            ->name('list')
            ->breadcrumbs(static fn(Trail $trail) : Trail => $trail
                ->parent('platform.index')
                ->push(__('Storage Logs'), route('platform.storage-logs.list'))
            );

        Route::screen('{storageLog}', StorageLogScreens\StorageLogShowScreen::class)
            ->name('show')
            ->breadcrumbs(static fn(Trail $trail, string $storageLog) : Trail => $trail
                ->parent('platform.storage-logs.list')
                ->push($storageLog, route('platform.storage-logs.show', $storageLog))
            );
    });

use Manzadey\LaravelOrchidStorageLogs\Screen\Actions\StorageLogsMenu;

class PlatformProvider extends OrchidServiceProvider
{
    /**
     * @return Menu[]
     */
    public function registerMainMenu(): array
    {
        return [
            // Menu items
            
            StorageLogsMenu::make()
                ->route('platform.storage-logs.list'),
        ];
    }
}
bash
php artisan vendor:publish --tag=storage-logs-config
bash
php artisan vendor:publish --tag=storage-logs-routes