Support the ongoing development of Laravel.io →
Testing Database
Last updated 2 years ago.
0

you need to use DB in top of TypesTableSeeder file. Like as bellow:

<?php

use Illuminate\Database\Seeder;
use DB;

/**
 * Class TypesTableSeeder
 */
class TypesTableSeeder extends Seeder
{

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        DB::table('types')->truncate();

        DB::table('types')->insert([
            'name' => 'Lake',
            'marker_file_name' => 'grey.png',
            'background_file_name' => '0154214587415',
            'description' => 'Description for a lake',
            'ShortName' => 'the shortname for a lake',
        ]);
}
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Jamie Norman jachno Joined 21 May 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.