How to align numbers right in the resource list view

To align number in Laravel Nova, there is a two step process:

  1. On your resource add this:

->withMeta([‘textAlign’ => ‘right’]),

2.

cp nova/resources/views/layout.blade.php resources/views/vendor/nova/layout.blade.php

Add this to the layout file:

.table td span.whitespace-no-wrap {
    display: block;
}

Reference:
https://github.com/laravel/nova-issues/issues/60

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top