PHP code example of innopanda / laravel-asset-manager
1. Go to this page and download the library: Download innopanda/laravel-asset-manager 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/ */
innopanda / laravel-asset-manager example snippets
return [
/*
|--------------------------------------------------------------------------
| Storage Disk
|--------------------------------------------------------------------------
*/
'disk' => env('ASSET_MANAGER_DISK', 'public'),
/*
|--------------------------------------------------------------------------
| Maximum Upload Size
|--------------------------------------------------------------------------
|
| Value is in KB.
|
*/
'max_upload_size' => 10240,
/*
|--------------------------------------------------------------------------
| Allowed MIME Types
|--------------------------------------------------------------------------
*/
'allowed_mime_types' => [
'image/jpeg',
'image/png',
'image/webp',
],
/*
|--------------------------------------------------------------------------
| Tenant Awareness
|--------------------------------------------------------------------------
*/
'tenant_aware' => false,
];
use Livewire\Attributes\On;
#[On('asset-selected')]
public function updateImage($image)
{
$this->selectedImage = $image;
}
use Innopanda\AssetManager\Filament\Forms\Components\AssetPicker;
AssetPicker::make('image')
->label('Image');