PHP code example of divineomega / laravel-natural-where
1. Go to this page and download the library: Download divineomega/laravel-natural-where 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/ */
divineomega / laravel-natural-where example snippets
$query = \App\User::query()
->naturalWhere('created_at', 'is between the years', ['2018', '2020'])
->naturalWhere('email', 'contains the word', 'jordan')
->naturalWhere('name', 'is not', 'Jordan Smith')
->naturalWhere('id', 'is one of the following', [1, 2, 3])
->get();