PHP code example of vpominchuk / laravel-mysql-use-index-scope
1. Go to this page and download the library: Download vpominchuk/laravel-mysql-use-index-scope 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/ */
vpominchuk / laravel-mysql-use-index-scope example snippets
use VPominchuk\ModelUseIndex;
class MyModel extends Model
{
use ModelUseIndex;
}
$builder = MyModel::where('name', $name)->where('age', $age)->
useIndex($indexName)->...
$table->index(['name', 'age'], 'user_age_index');