PHP code example of soysaltan / appender

1. Go to this page and download the library: Download soysaltan/appender 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/ */

    

soysaltan / appender example snippets


class User extends Model
{
    use HasFactory, Appends; // <--add this; 
    ...

class User extends Model
{
    use HasFactory, Appends; // <--add this; 
    
    protected $appends = ['created_at_by_human', 'created_at_formatted'];

User::$withoutAppends=true; // User -> your user mmodel