Download the PHP package imliam/yii2-traits without Composer
On this page you can find all versions of the php package imliam/yii2-traits. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imliam/yii2-traits
More information about imliam/yii2-traits
Files in imliam/yii2-traits
Package yii2-traits
Short Description A collection of miscellaneous traits to extend parts of Yii2
License MIT
Homepage https://github.com/imliam/yii2-traits
Informations about the package yii2-traits
Yii2 Traits
A collection of miscellaneous traits to extend parts of Yii2.
- Yii2 Traits
- 💾 Installation
- 📝 Usage
yii\db\Migration
- Migration@fillColumn(string $table, string $column, $value)
yii\db\ActiveRecord
- ActiveRecord@firstOrCreate(array $attributes, array $values = []): self
- ActiveRecord@create(array $attributes): self
- ActiveRecord@make(array $attributes): self
- ActiveRecord@deleteIfExists(array $attributes)
- ActiveRecord@first(string $orderBy = null)
- ✅ Testing
- 🔖 Changelog
- ⬆️ Upgrading
- 🎉 Contributing
- 🔒 Security
- 👷 Credits
- ♻️ License
💾 Installation
You can install the package with Composer using the following command:
Once installed, you can then use
the traits in your existing classes.
📝 Usage
yii\db\Migration
Migration@fillColumn(string $table, string $column, $value)
Set the default value of an existing column.
yii\db\ActiveRecord
ActiveRecord@firstOrCreate(array $attributes, array $values = []): self
Get the first record matching the attributes or create it. Perfect for handling pivot models.
ActiveRecord@create(array $attributes): self
Create a new instance of the model and persist it.
ActiveRecord@make(array $attributes): self
Create a new instance of the model without persisting it.
ActiveRecord@deleteIfExists(array $attributes)
Delete a model matching the given attributes.
ActiveRecord@first(string $orderBy = null)
Get the first instance of a model.
✅ Testing
🔖 Changelog
Please see the changelog file for more information on what has changed recently.
⬆️ Upgrading
Please see the upgrading file for details on upgrading from previous versions.
🎉 Contributing
Please see the code of conduct for details on contributing to the project.
🔒 Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
👷 Credits
- Liam Hammett
- All Contributors
♻️ License
The MIT License (MIT). Please see the license file for more information.