#2: Laravel Excel Import to Database with Errors and Validation Handling



4
52374

In this tutorial, you will learn how to import large-sized excel into a database using the Laravel Excel package. This Laravel excel package provides the feature of chunk reading and batch inserts to import the data! You can also queue every chunk of a file. #𝟏: 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐱𝐜𝐞𝐥 𝐄𝐱𝐩𝐨𝐫𝐭 𝐝𝐚𝐭𝐚 𝐢𝐧 𝐄𝐱𝐜𝐞𝐥, 𝐂𝐒𝐕 & 𝐦𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐬𝐡𝐞𝐞𝐭 𝐞𝐱𝐩𝐨𝐫𝐭 https://www.youtube.com/watch?v=VUet2wq22-o 𝐆𝐢𝐭𝐇𝐮𝐛 𝐑𝐞𝐩𝐨: https://github.com/qirolab/laravel-excel-export-import-example 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐱𝐜𝐞𝐥 𝐏𝐚𝐜𝐚𝐤𝐠𝐞: https://github.com/maatwebsite/Laravel-Excel 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐱𝐜𝐞𝐥 𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥 𝐏𝐥𝐚𝐲𝐥𝐢𝐬𝐭: https://www.youtube.com/playlist?list=PL1TrjkMQ8UbWeumS9QLpRWpkG7qIKHSqX 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐞 𝐏𝐃𝐅 𝐟𝐫𝐨𝐦 𝐇𝐓𝐌𝐋 𝐔𝐬𝐢𝐧𝐠 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐒𝐧𝐚𝐩𝐩𝐲 𝐏𝐚𝐜𝐤𝐚𝐠𝐞 https://www.youtube.com/watch?v=P43fuBbmD1c 𝐄𝐱𝐩𝐨𝐫𝐭 𝐆𝐨𝐨𝐠𝐥𝐞 𝐂𝐡𝐚𝐫𝐭 𝐢𝐧 𝐏𝐃𝐅 𝐔𝐬𝐢𝐧𝐠 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐒𝐧𝐚𝐩𝐩𝐲 𝐏𝐚𝐜𝐤𝐚𝐠𝐞 https://www.youtube.com/watch?v=Phl26OHMs-E 00:00 Intro 00:34 artisan make:import & import users data in the database 01:11 import route and form to upload excel file 03:46 Import excel file content into Database 07:13 `Importables` trait 10:00 `WithHeadingRow` interface to handle headings in excel file 10:20 Handling Errors 14:28 Handling validation errors 22:56 Batch inserts 24:56 Chunk reading 25:38 Queued imports 27:35 Import relationship model 31:46 `afterImport` Event Support my work: 1. On BuyMeACoffee: https://www.buymeacoffee.com/qirolab 2. On Patreon: https://www.patreon.com/qirolab Also, follow us on: 𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: https://fb.com/qirolab 𝐓𝐰𝐢𝐭𝐭𝐞𝐫: https://twitter.com/qirolab

Published by: QiroLab Published at: 3 years ago Category: علمی و تکنولوژی