PHP code example of nunahsan / db
1. Go to this page and download the library: Download nunahsan/db 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/ */
nunahsan / db example snippets
use Nunahsan\Db\Paginator;
class yourClass {
public function yourMethod() {
$select = \DB::table('tableName');
$res = Paginator::get($select, 15);
return response()->json([
'data' => $res ?? []
]);
}
}