{"repo":"elipZis/laravel-pastable-model","free":true,"listed":false,"github":"https://github.com/elipZis/laravel-pastable-model","clone":"git clone https://github.com/elipZis/laravel-pastable-model.git","description":"⚙️ Cut/Copy & Paste Laravel Eloquent model data into another table","language":"PHP","stars":11,"topics":["copy-paste","eloquent","entity","laravel","logging","model","cut-paste"],"license":"MIT","category":"analytics","readme_excerpt":"Cut/Copy & Paste Laravel Eloquent models into another table Enable your models to regularly cut/copy & paste their data into another table. - Cut & Paste or Copy & Paste - Scheduled Jobs available to regularly & asynchronously run - Cut & Paste in chunks, to split potential long-running processes - Store data e.g. into logging or daily tables and keep the production data clean Installation You can install the package via composer: You can publish the config file with: This is the contents of the published config file: Usage To make your model copy & pastable, add the trait CopyPastable . It will copy & paste your configured query result into the target table. To make your model cut & pastable, add the trait CutPastable . It will cut (delete) & paste your configured query result into the target table. If more rows than the chunk size (limit) are affected, it will respawn its own job until completed. Configuration To use any trait, you need to configure two settings: - the target table - the query to read its data from Target table (mandatory) You must define the target table name. or by overriding the getter function, to e.g. create dynamic table names If the table does not exist, you can use the configuration setting autoCreate and set it to true to have the system try to create the table from your query source. It is recommended for you to create the table manually or via migration, as the automation is not fully tested and functional to any database system and table structu","default_branch":null,"files":null,"tree":[],"storefront":"/r/elipZis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elipZis/laravel-pastable-model/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}