sauravs012
1 month ago
198
9
General

Seeders not inserting values in DB

Posted 1 month ago by sauravs012

My CODE

<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class AlgorithmTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
		$AlgorithmData = "INSERT INTO `algorithms` (`id`, `title`) VALUES
         (1, 'test1'),
         (2, 'test2'),
         (3, 'test3')
		 ";
		DB::insert($AlgorithmData);
    }
}


Please sign in or create an account to participate in this conversation.