Skip to content

Instantly share code, notes, and snippets.

View mpeswani's full-sized avatar
🎯
Focusing

Manohar Peswani mpeswani

🎯
Focusing
View GitHub Profile
/*******************************************************************************
* Tron Ledger Wallet
* (c) 2018 Ledger
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@mpeswani
mpeswani / index.php
Created August 31, 2015 18:32
index.php
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com>
*/
/*
|--------------------------------------------------------------------------
@mpeswani
mpeswani / CakephpRestApiTest.php
Last active August 29, 2015 14:26
Cake Rest Api Test
Added in route.php
$routes->connect('/', ['controller' => 'Users', 'action' => 'index', 'home']);
$routes->connect('/users/*', ['controller' => 'Users', 'action' => 'index']);
Router::scope('/', function ($routes) {
$routes->extensions(['xml']);
$routes->resources('Users');
});
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
<?php
use App\Controller\AppController;
use Cake\Event\Event;
use Cake\Network\Exception\NotFoundException;
class UsersController extends AppController {
public function beforeFilter(Event $event) {
parent::beforeFilter($event);