PHP code example of frenchfrogs / reference

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

    

frenchfrogs / reference example snippets


use FrenchFrogs\Models\Reference;

//....

Reference::createDatabaseReference($id, $name, $collection, $data = null );

$reference = \ref('member.status')->getData();
dd($reference);

$reference = \ref('member.status')->pairs();
dd($reference);
bash
composer reference:table
php migrate
php artisan reference:build

array:3 [▼
  "MEMBER_STATUS_ACTIVE" => "Actif"
  "MEMBER_STATUS_PAID" => "Payant"
  "MEMBER_STATUS_DELETED" => "Supprimé"
]