PHP code example of diarsa / laravel-where-like

1. Go to this page and download the library: Download diarsa/laravel-where-like 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/ */

    

diarsa / laravel-where-like example snippets


$search = $request->search;
return User::where('status', 1)
    ->whereLike(['name', 'address', 'categoryDetail.category_code', 'histories.device'], $search)
    ->get();


$laravelWhereLike = new Diarsa\LaravelWhereLike\LaravelWhereLike();
echo $laravelWhereLike->tambah(1, 4);

use Diarsa\LaravelWhereLike\LaravelWhereLike;
Route::get('calculate', function() {
    return LaravelWhereLike::tambah(1, 4);
});