PHP code example of hnhdigital-os / laravel-model-traits

1. Go to this page and download the library: Download hnhdigital-os/laravel-model-traits library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hnhdigital-os / laravel-model-traits example snippets


use Bluora\LarvelModelTraits\ModelValidationTrait;

class User extends Model
{
    use ModelValidationTrait;

}

use Bluora\LarvelModelTraits\ModelEventsTrait;

class User extends Model
{
    use ModelEventsTrait;

}

use Bluora\LarvelModelTraits\OrderByTrait;

class User extends Model
{
    use OrderByTrait;

    protected $default_order_by = 'name';
    protected $default_order_direction = 'asc';
}

use Bluora\LarvelModelTraits\ModelStateTrait;

class User extends Model
{
    use ModelStateTrait;

}