Releases: cleaniquecoders/blueprint-macro
Releases · cleaniquecoders/blueprint-macro
Added money Blueprint
Added $table->money()
Blueprint.
Usage
/**
* This will create a column with decimal data type, precision of 8 and scale of 2 and column name money.
**/
$table->money();
/**
* This will create a column with decimal data type, precision of 8 and scale of 2 and column name price.
**/
$table->money('price');
/**
* This will create a column with decimal data type, precision of 18 and scale of 2 and column name price.
**/
$table->money('price', 18);
/**
* This will create a column with decimal data type, precision of 18 and scale of 4 and column name price.
**/
$table->money('price', 18, 4);
Added Laravel 5.7 Support
v2.2.0 Added Support Laravel 5.7
Use Eloquent Builder instead of Query Builder
v2.1.1 Workaround on hasMacro not found
Added Model Macros
To simplify the query based on Blueprint Macro, I've decided to add Model Macros as well.
Which mean, you can start query your data like:
$user = \App\User::hashslug($hashslug)->firstOrFail();
$user = \App\User::findByHashslugOrId($hashslugOrId);
and many more - will update the wiki.
Simplify Directory Structure
v2.0.9 Simplify directory structure
Update PHP CS Fixer
v2.0.8 Update PHP CS Fixer Config && Reorganise macros
Update
- Update Dependencies
- Update README
- Added Scrutinizer Badge
Fixed _at in addAcceptance Macro
v2.0.6 Merge branch 'develop'
Fixed addForeign not Creating referenceOn
Fixed addForeign
not creating referenceOn
Update addAcceptance(), by() macro.
- Added 2nd argument to
addAcceptance()
macro to define tableby()
will use.
$table->addAcceptance('approved'); // by default it will refer to users table
$table->addAcceptance('approved', 'supervisors');
- Set nullable as default for
by()
macro.