hwa-meta is a meta package. It helps us to build and develop faster with pre-built functions. This saves a lot of time on future projects.
We share this package to give programmers an extra useful library. We hope people use this package not for commercialization or profit of any kind.
And finally, hope to receive more contributions and shares from all of you.
Thank you very much 🧡
composer require hwavina/hwa-meta
config/app.php file:'providers' => array(
// ...
Hwavina\HwaMeta\HwaMetaServiceProvider::class,
);
config/hwa_meta.php config file . If you customize file config/hwa_meta.php. You need to run the command below to clear cache and update the changes.php artisan config:cache
# or
php artisan optimize:clear
You can view the default config file contents at:
https://github.com/hwavina/hwa-meta/blob/main/config/hwa_meta.php
This tool helps you to easily manage the extended data fields of certain objects.
Example: We need CustomerMeta. This tools help us make model file and migration file.
php artisan hwa:make:meta Customer -m
The above command we have added -m to create the migration file.
config/hwa_meta.php'allow_type' => [
.....
'customer' => ['id', 'customer_id'],
],
php artisan config:cache
# or
php artisan optimize:clear
php artisan migrate
After completing the above configuration steps you can use the methods available in the meta model in the classes you want.
// Example
CustomerMeta:_update(1, 'gender', 'male'); // update or add new gender for customer has id is 1
Beside the functions and methods we have built, people can also build their own by inheriting our classes.
Please see CHANGELOG for more information what has changed recently.
If you discover a security vulnerability within hwa-meta, please send an e-mail to Phi Hoang via hwavina@gmail.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.
How can I help you explore Laravel packages today?