The missing Back button of laravel nova 4
This back button uses javascript history.back()
method for navigation. Back button will be automatically attached to the default Card
component.
so additional configuration not needed
- Run command
composer require visanduma/nova-back-navigation
- Register tool with
NovaServiceProvider
use Visanduma\NovaBackNavigation\NovaBackNavigation;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
public function tools()
{
return [
..
new NovaBackNavigation(),
];
}
- Publish language & config files (optional)
php artisan vendor:publish --provider="Visanduma\NovaBackNavigation\ToolServiceProvider"
- Great !. you are done
<?php
// config for nova back button
return [
/*
Enable back button for following routes
*/
'enabled_urls' => [
"nova/resources/*/*",
]
];