PHP code example of mobileka / scope-applicator

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

    

mobileka / scope-applicator example snippets


public $scopes = [
    'orderByTitle' => ['alias' => 'order_by_title']
];

public $scopes = [
    'userId' => [
        'alias' => 'author_id',
        'type' => 'int'
    ],
    'new' => [
        'type' => 'bool'
    ]
];

public $scopes = [
    'userId' => [
        'alias' => 'author_id',
        'default' => 5
    ]
];

public $scopes = [
    'userId' => [
        'alias' => 'author_id',
        'allowEmpty' => true
    ]
];

public $scopes = [
    'createdAt' => [
        'alias' => 'created_at',
        'keys' => ['from', 'to']
    ]
];