PHP code example of anekdotes / staticmodel

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

    

anekdotes / staticmodel example snippets


class Languages extends StaticModel {

  public static $data = array(
    array(                 
      'id' => 1,           
      'name' => 'English',
      'small' => 'en' 
    )
  );
      
}       

$english = Languages::find(1);
$englishname = $english->name;