PHP code example of nova-horizons / realoquent

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

    

nova-horizons / realoquent example snippets


return [
    'users' => [
        'model' => \App\Models\User::class,
        'columns' => [
            'id' => [
                'type' => ColumnType::id,
                'guarded' => true,
                'primary' => true,
            ],
            'team_id' => [
                'type' => RelationshipType::belongsTo,
                'relatedModel' => \App\Models\Team::class,
            ],
            'username' => [
                'type' => ColumnType::string,
                'fillable' => true,
                'unique' => true,
                'validation' => '