1. Go to this page and download the library: Download finnwiel/shazzoo-media 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/ */
finnwiel / shazzoo-media example snippets
public function panel(Panel $panel): Panel
{
return $panel
->viteTheme('resources/css/filament/admin/theme.css')
->plugins([
\Awcodes\Curator\CuratorPlugin::make()
->label('Media')
->registerNavigation(true)
->showBadge(true)
])
}
$image->thumbnail_url // returns URL for the 'thumbnail' conversion
$image->web_url // returns URL for the 'web' conversion
// In your Post.php model
use FinnWiel\ShazzooMedia\Models\ShazzooMedia;
public function featuredImage()
{
return $this->belongsTo(ShazzooMedia::class, 'media_id');
}
// In your Product.php model
use FinnWiel\ShazzooMedia\Models\ShazzooMedia;
public function gallery()
{
return $this->hasMany(ShazzooMedia::class, 'product_id');
}