eur-rsm / database-view-export
A Laravel Nova package for exporting configured database views.
Installs: 2 060
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=8.1.0
- laravel/nova: *
- maatwebsite/excel: ^3.1
README
Export manually created database views
Installation
- Override the Nova layout through creating
resources/views/vendor/nova/layout.blade.php
in your project route. - Add
@include('database-view-export::exports-dropdown')
to your desired location- Example:
<!-- Content --> <div class="content"> <div class="flex items-center relative shadow h-header bg-white z-20 px-view"> <a v-if="@json(\Laravel\Nova\Nova::name() !== null)" href="{{ \Illuminate\Support\Facades\Config::get('nova.url') }}" class="no-underline dim font-bold text-90 mr-6"> {{ \Laravel\Nova\Nova::name() }} </a> @if (count(\Laravel\Nova\Nova::globallySearchableResources(request())) > 0) <global-search dusk="global-search-component"></global-search> @endif {{-- Add dropdown menu for exports package --}} <div class="ml-auto flex items-center dropdown-right"> @include('database-view-export::exports-dropdown') </div> <dropdown class="ml-8 h-9 flex items-center dropdown-right"> @include('nova::partials.user') </dropdown> </div> <div data-testid="content" class="px-view py-view mx-auto"> @yield('content') @include('nova::partials.footer') </div> </div>
- Add the displayed key & the specific name of the view database for it to render in the dropdown.