pishran/nova-rtl-theme
A right-to-left theme for Laravel Nova that adapts the dashboard, forms, tables, and navigation for Persian, Arabic, and other RTL languages. Install via Composer and enable the theme for a cleaner, more natural Nova experience.
composer require pishran/nova-rtl-theme
php artisan vendor:publish --tag=nova-rtl-theme
# or, if no tag is registered:
php artisan vendor:publish --provider="Pishran\NovaRtlTheme\NovaRtlThemeServiceProvider"
php artisan optimize:clear
php artisan nova:publish
/nova and verify the sidebar is on the right, table columns are reversed, forms align right, and the theme stylesheet is present in the page source. If the layout is still LTR, inspect the rendered <link> tags and the public/vendor directory before changing any package code.Where to look first:
config/nova-rtl-theme.php (if published).vendor/pishran/nova-rtl-theme/src — especially the service provider, to see exactly what Nova hook or asset registration is used.public/vendor/nova-rtl-theme — the published CSS actually served to the browser.Global RTL admin. The simplest and most common pattern: install once and let every Nova user receive the RTL theme. This works well when the back office is staffed by RTL-first users and you do not need a language toggle in the UI.
Mixed LTR/RTL audiences. If some Nova users need English/LTR and others need RTL, conditionally register the theme in NovaServiceProvider::boot() based on the authenticated user’s locale or a per-user preference:
public function boot()
{
parent::boot();
if (auth()->user()?->locale === 'ar') {
// Register the RTL theme asset/hook here.
}
}
Keep the condition cheap and null-safe; Nova boots before some session state is available in certain contexts.
Branding plus RTL. Publish the package CSS, then add your own overrides in a stylesheet loaded after the theme. Use logical CSS properties (margin-inline-start, padding-inline-end, text-align: start) so your custom branding remains correct in both directions.
Deployment workflow. Include the publish step in your deploy script when theme assets are not committed:
php artisan vendor:publish --tag=nova-rtl-theme --force
php artisan nova:publish
php artisan optimize:clear
Without --force, an upgraded package can leave stale published CSS in public/vendor, which is the most common reason a bugfix appears not to work.
Custom fonts. Arabic and Hebrew glyphs often need a different font stack from Nova’s default. Override font-family in a post-theme stylesheet rather than editing vendor files, so upgrades remain safe.
Smoke test. Add a feature test that authenticates a Nova user, requests /nova, and asserts a 200 response plus the presence of the theme asset path. This catches broken publish steps during CI.
--force and clear caches — the fix may live in published CSS/JS, not only in PHP code.composer update alone will not refresh public/vendor/nova-rtl-theme. Always run the publish command after upgrading the package.php artisan config:cache ran before the package config was published, the theme may appear unconfigured. Clear and rebuild config after publishing.left/right, floats, and directional icons; the theme cannot fix components that do not use logical properties./nova output. If the layout is unchanged, the problem is in Nova configuration or asset publishing, not the theme itself.How can I help you explore Laravel packages today?