Skip to content

Commit

Permalink
fix(import): skip empty rows
Browse files Browse the repository at this point in the history
rather than create empty card
  • Loading branch information
jxjj committed Jan 17, 2025
1 parent 85db79f commit e63ec5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Imports/CardsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
namespace App\Imports;

use App\Models\Card;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Str;

class CardsImport implements ToModel, WithHeadingRow
class CardsImport implements SkipsEmptyRows, ToModel, WithHeadingRow
{
protected $deckId;

Expand Down

0 comments on commit e63ec5b

Please sign in to comment.