bale / emperan
Bale Landing Page Backend
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/bale/emperan
Requires
- php: ^8.1
- illuminate/contracts: ^11.0||^12.0
- league/flysystem-aws-s3-v3: ^3.0
- livewire/livewire: *
- mallardduck/blade-lucide-icons: *
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
This package is auto-updated.
Last update: 2026-01-09 11:24:54 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
composer require paparee/bale-emperan
You can publish and run the migrations with:
php artisan vendor:publish --tag="bale-emperan-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="bale-emperan-config"
This is the contents of the published config file:
return [
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="bale-emperan-views"
Usage
SEO Meta Tags
Model apapun dapat mendukung SEO dengan menggunakan trait HasSeoMeta:
use Bale\Emperan\Traits\HasSeoMeta; class YourModel extends Model { use HasSeoMeta; }
Model bawaan yang sudah mendukung SEO:
Post- untuk artikel/beritaPage- untuk halaman statisSection- untuk section landing page
Menggunakan SEO Component di Blade
Gunakan component <x-emperan::seo-meta> di layout Blade Anda:
<head> {{-- Dengan model --}} <x-emperan::seo-meta :model="$post" /> {{-- Dengan fallback defaults --}} <x-emperan::seo-meta :model="$post" :defaults="[ 'title' => 'Default Title', 'description' => 'Default description', 'image' => asset('img/default-og.jpg'), ]" /> </head>
Component akan otomatis render:
- Title dan meta description
- Open Graph tags (Facebook)
- Twitter Card tags
- Canonical URL
- Robots meta (noindex/nofollow)
- JSON-LD structured data
Menyimpan SEO Meta ke Database
// Create/update SEO meta $post->updateSeoMeta([ 'title' => 'Custom SEO Title', 'description' => 'Custom meta description for search engines', 'keywords' => 'keyword1, keyword2, keyword3', 'og_title' => 'Custom Open Graph Title', 'og_description' => 'Description for social media', 'og_image' => 'https://example.com/og-image.jpg', 'canonical_url' => 'https://example.com/canonical', 'no_index' => false, 'no_follow' => false, ]); // Akses SEO data $post->getSeoTitle(); $post->getSeoDescription(); $post->getOgImage(); $post->getSeoKeywords();
Sitemap XML
Sitemap otomatis diakses di:
/sitemap.xml- Sitemap index/sitemap-posts.xml- Sitemap untuk posts/sitemap-pages.xml- Sitemap untuk pages
Sitemap akan otomatis mengambil data dari database dengan:
lastmoddariupdated_atchangefreqdanpriorityyang optimal- Image sitemap extension untuk thumbnail
Robots.txt
Robots.txt dinamis diakses di /robots.txt dengan:
- Allow semua crawler
- Disallow admin, API, dan auth paths
- Sitemap URL otomatis
Menambahkan SEO ke Model Custom
Untuk menambahkan SEO ke model custom Anda:
// 1. Tambahkan trait ke model use Bale\Emperan\Traits\HasSeoMeta; class Event extends Model { use HasSeoMeta; // Model harus punya 'title' untuk fallback default } // 2. (Opsional) Tambahkan ke sitemap dengan extend SitemapController
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.