Update dependencies and enhance components
- Added "halaxa/json-machine" dependency to composer.json. - Updated content hash in composer.lock to reflect changes. - Improved SpatieMediaLibraryFileEntry component documentation. - Expanded FillJsonData seeder to include new migrators for card types, orders, and pin orders. - Updated Tailwind CSS version in app.css. - Refactored various JavaScript components for better performance and readability. - Added a test route in web.php for debugging purpose
This commit is contained in:
29
database/seeders/Migrators/CardPinOrdersMigrator.php
Normal file
29
database/seeders/Migrators/CardPinOrdersMigrator.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\Migrators;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class CardPinOrdersMigrator
|
||||
{
|
||||
public function migrate(): void
|
||||
{
|
||||
DB::table('card_pin_orders')->truncate();
|
||||
|
||||
$path = database_path('data/nurmuhammetsdb/card_pins.json');
|
||||
|
||||
$rawData = File::json($path);
|
||||
|
||||
foreach ($rawData as $data) {
|
||||
if (! empty($data['deleted_at'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
unset($data['deleted_at']);
|
||||
|
||||
DB::table('card_pin_orders')
|
||||
->insert($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user