-
-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Nasrul Hazim Bin Mohamad edited this page Jun 14, 2018
·
2 revisions
Macro enabled you to extend the functionality of a class. In this case, we're extending Blueprint, to ensure the readability and standardisation of data type used across the application.
Developers don't need to know much on what data type they should use - for instance, if a developer want to add a column to check on either the account is activated or not, developers can simply define the migration as following:
$table->is('activated', false); // the column name will be is_activated, data type of boolean and by default is false
The Blueprint Macro package simply categorised the data type by it's own category:
- Foreign Key
- Identifier
- Short String
- Long String
- Acceptance
- Money
- Misc.