PHP code example of workup / nova-back-button
1. Go to this page and download the library: Download workup/nova-back-button library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
workup / nova-back-button example snippets
use Workup\NovaBackButton\NovaBackButton;
public function cards()
{
return [
(new NovaBackButton())
->onlyOnDetail(),
(new NovaBackButton())
->onlyOnDetail()
->width('1/3')
->markdown('# Hello World!'),
(new NovaBackButton())
->onlyOnDetail()
->width('1/3')
->view('partials.back-button')
->url(sprintf('%s/resources/%s/%d', config('nova.path'), User::uriKey(), \App\Models\User::first()->id)),
];
}