Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Rtl Theme Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install the theme into the Laravel app that hosts Nova:
composer require pishran/nova-rtl-theme
  1. Publish the package assets/config. Use the tag/provider documented in the package README; typically:
php artisan vendor:publish --tag=nova-rtl-theme
# or, if no tag is registered:
php artisan vendor:publish --provider="Pishran\NovaRtlTheme\NovaRtlThemeServiceProvider"
  1. Clear caches and re-publish Nova assets:
php artisan optimize:clear
php artisan nova:publish
  1. First use case: an Arabic, Hebrew, Persian, or Urdu admin back office. Open /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:

  • The package README and 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.
  • Issue #24 on GitHub, which v1.5.13 fixes, if you are upgrading from an earlier 1.5.x release.

Implementation Patterns

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.

Gotchas and Tips

  • v1.5.13 is a patch release. It fixes issue #24 and does not advertise breaking changes. Upgrade normally, but re-publish assets with --force and clear caches — the fix may live in published CSS/JS, not only in PHP code.
  • Published assets are snapshots. composer update alone will not refresh public/vendor/nova-rtl-theme. Always run the publish command after upgrading the package.
  • Config caching order matters. If php artisan config:cache ran before the package config was published, the theme may appear unconfigured. Clear and rebuild config after publishing.
  • Nova upgrades can break theme selectors. Nova’s internal class names and layout change between major versions. Pin the theme to a tested version and re-check the admin UI after every Nova upgrade.
  • Third-party Nova cards and tools are often LTR-only. Audit custom tools for hard-coded left/right, floats, and directional icons; the theme cannot fix components that do not use logical properties.
  • Use logical CSS in your own overrides. Physical properties reintroduce LTR bugs in RTL mode and make future bidirectional support harder.
  • Dark mode and brand colors. Override Nova’s CSS variables rather than hard-coding hex values, otherwise RTL and dark-mode combinations can produce unreadable contrast.
  • Browser and CDN caching can mask a successful fix. Hard-refresh and confirm the served asset hash changed after re-publishing.
  • Debugging isolation. Temporarily disable the package’s service provider or theme registration and compare /nova output. If the layout is unchanged, the problem is in Nova configuration or asset publishing, not the theme itself.
  • Watch the issue tracker for #24 context. The release note only links the issue; read it before upgrading production if your app depends on the specific layout area it touched.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle