PHP code example of lesichkovm / laravel-advanced-model

1. Go to this page and download the library: Download lesichkovm/laravel-advanced-model 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/ */

    

lesichkovm / laravel-advanced-model example snippets


class MyModel extends \AdvancedSnakeCaseModel {
    private $useUniqueId = true;
}

class MyModel extends \AdvancedCamelCaseModel {
    private $useUniqueId = true;
}

class MyModel extends \AdvancedSnakeCaseModel {
    private $useUniqueId = true;
}

class MyModel extends \AdvancedSnakeCaseModel {
    private $useUuid = true;
}

class MyModel extends \AdvancedSnakeCaseModel {
    private $incrementing = true;
}

$instance = new MyModel;
$instance->save();

echo $instance->id;

$instance = new MyModel;
$instance->save();

echo $instance->Id;