Seeding a table with boolean value, 1 or 'true'

Posted 8 months ago by Gabotronix

Given an user model/table with a boolean value of is_Super_Admin, how should I assign the value? should I use 1 or true? do I have to use commas like this ('true') if so?

public function run()
    {
        DB::table('users')->insert([
            'name' => 'Gabotronix',
            'email' => '[email protected]',
            'password' => bcrypt('perolaperra2203'),
            'is_Super_Admin' => true,
        ]);
    }

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.