This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Pagination\Paginator; | |
//This example is a bit more comlex since I have columns that are foreign keys of the Ticket table. | |
public function index(Request $request) | |
{ | |
if($request->ajax()) { | |
$columns = ['tickets.id', 'client_name', 'location', 'priority_name', 'status_name', 'date']; | |
$draw = $request->draw; | |
$start = $request->start; //Start is the offset | |
$length = $request->length; //How many records to show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS | |
// data becomes querystring on GET requests | |
class Http { | |
constructor() { | |
let methods = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options'] | |
methods.forEach((method) => { | |
this[method] = (url, data, opts) => m.request(Object.assign({ method, url, data }, opts, this.eval(), this.defaults)) | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Kevin Kowalewski | |
* | |
*/ | |
public class Root { | |
private static String LOG_TAG = Root.class.getName(); | |
public boolean isDeviceRooted() { | |
if (checkRootMethod1()){return true;} |