use Tanvirofficials\CopyClone\CopyClone;
CopyClone::make() ->withMeta([ 'resource' => 'posts', // resource url 'model' => 'App\Post', // model path 'id' => $this->id, // id of record 'relations' => ['tags', 'comments'], // an array of any relations to load (nullable). 'except' => ['status'], // an array of fields to not replicate (nullable). 'override' => ['status' => 'published'] // an array of fields and values which will be set on the modal after Cloning(nullable). ]),
You can either place it on the bottom right or top right corner.
For the bottom right corner , place the code bellow all of your nova feild.
For the top right corner , place the code on the top of all of your nova feild.
You can customize the Copy clone button text→
CopyClone::make() ->withMeta([ .... include other metas .... , 'button_text' => 'Custom Copy\Clone Button', // By deafult its copy\clone icon. ]),
→Use title,body,confirm_button_text and cancle_button_text meta for customization
CopyClone::make() ->withMeta([ .... include other metas .... , 'title' => 'Custom Title', // by default 'title' => 'Confirmation' 'body' => 'Custom Body', // by default 'body' => 'Are you sure ?' 'confirm_button_text' => 'Custom Confirm Button' , // by default 'confirm_button_text' => 'Copy\Clone' 'cancle_button_text' => 'Custom Cancle Button' // by default 'cancle_button_text' => 'Cancle' ]),
→This package only available in Resource Detail page.