tethys/database/seeders/MimetypeTableSeeder.php
Arno Kaimbacher 7d1406ee5c - array/string Helpers: Laravel Convert old array and string helpers into their modern class-based methods.
-  Use Laravel Carbon: Laravel provides an Illuminate\Support\Carbon class which wraps the underlying Carbon class. By using this class, you gain access to some additional testing methods and create separation between your code and underlying dependencies.
2022-08-12 07:53:27 +00:00

74 lines
2.2 KiB
PHP

<?php
namespace Database\Seeders;
use Illuminate\Support\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class MimetypeTableSeeder extends Seeder
{
public function run()
{
DB::table('mime_types')->insert([
[
'name' => 'application/x-sqlite3',
'file_extension' => 'gpkg',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'image/jpeg',
'file_extension' => 'jpg|jpeg|jpe',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'image/png',
'file_extension' => 'png',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'application/pdf',
'file_extension' => 'pdf',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'text/html',
'file_extension' => 'htm|html',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'text/csv',
'file_extension' => 'csv',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'text/plain',
'file_extension' => 'txt|asc|c|cc|h|srt',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'name' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'file_extension' => 'xlsx',
'enabled' =>true,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
]);
}
}