sql-serverlaraveldatabase-migrationlaravel-migrationsdbmigrate

How to make bit column like in SQL Server using Laravel Database Migration


So I'm creating a new table, replicating an existing table, and one of them has a column of type bit, like this: screenshot

I already understand the concept of migration and have made it often, but to create this column of bit type via migration, what type of column should I use from what Laravel provides here?

I've been looking for references, but haven't found an answer yet.

Thank you, please help.


Solution

  • You can declare a column with type of bit by using the binary in the migration. Here is an example to it

    $table->binary('column_name');