PHP code example of aliziodev / laravel-wilayah-logos
1. Go to this page and download the library: Download aliziodev/laravel-wilayah-logos 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/ */
aliziodev / laravel-wilayah-logos example snippets
// Setelah install, Province dan Regency auto dapat method logoUrl() dan logoPath()
$province = Province::where('code', '32')->first();
// URL logo untuk <img> tag
echo $province->logoUrl(); // PNG 1200px
echo $province->logoUrl('thumb'); // PNG 100px (thumbnail)
// Path absolut (untuk server-side usage)
echo $province->logoPath();
echo $province->logoPath('thumb');
// Contoh: Kab/Kota
$regency = Regency::where('code', '32.73')->first();
echo $regency->logoUrl(); // Logo Kota Bandung