Download the PHP package tanvirofficials/copy-clone without Composer
On this page you can find all versions of the php package tanvirofficials/copy-clone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tanvirofficials/copy-clone
More information about tanvirofficials/copy-clone
Files in tanvirofficials/copy-clone
Package copy-clone
Short Description A Laravel Nova Package for Copy or clone a resource Data.
License MIT
Informations about the package copy-clone
Copy Clone - A laravel nova package for cloning any resource data.
By ->tanvirofficials
Install Copy-clone package to your nova project
$ composer require tanvirofficials/copy-clone
Usage
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.
image::https://live.staticflickr.com/65535/49716165116_6b114252ab_k.jpg[Demo Image 1.1]
For the top right corner , place the code on the top of all of your nova feild.
image::https://live.staticflickr.com/65535/49716480142_078255a179_k.jpg[Demo Image 1.2]
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.
]),
image::https://live.staticflickr.com/65535/49716481277_77624978f8_k.jpg[Demo image 1.3]
You can customize your own dialogue box. By Default ->
Customization of confirm dialogue box .
_->Use title,body,confirm_button_text and cancle_buttontext meta for customization
image::https://live.staticflickr.com/65535/49711939342_756c8d63ac_k.jpg[Demo image 2]
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'
]),
image::https://live.staticflickr.com/65535/49711922942_0d73f97285_k.jpg[Demo image 3]
->This package only available in Resource Detail page.