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
Router::prefix('admin', function ($routes) { | |
$routes->plugin( | |
'IncUsers', | |
['path' => '/users'], | |
function (RouteBuilder $routes) { | |
$routes->fallbacks('DashedRoute'); | |
$routes->connect('/login/', ['controller' => 'Users', 'action' => 'login']); | |
$routes->connect('/register/', ['controller' => 'Users', 'action' => 'add']); | |
$routes->connect('/logout/', ['controller' => 'Users', 'action' => 'logout']); |
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
Router::scope('/', function ($routes) { | |
$routes->plugin( | |
'IncUsers', | |
['path' => '/'], | |
function (RouteBuilder $routes) { | |
$routes->connect('/login/', ['controller' => 'Users', 'action' => 'login']); | |
$routes->connect('/register/', ['controller' => 'Users', 'action' => 'add']); | |
$routes->fallbacks('DashedRoute'); | |
}); | |
}); |
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 | |
/** | |
* Routes configuration | |
* | |
* In this file, you set up routes to your controllers and their actions. | |
* Routes are very important mechanism that allows you to freely connect | |
* different URLs to chosen controllers and their actions (functions). | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
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 Cake\Routing\RouteBuilder; | |
use Cake\Routing\Router; | |
Router::prefix('admin', ['_namePrefix'=>'admin:'], function ($routes) { | |
$routes->scope('/users', ['plugin'=>'IncUsers', 'controller'=> 'Users', '_namePrefix'=>'users:'], function ($routes) { | |
$routes->connect('/', ['action'=>'index'], ['_name'=>'index']); | |
$routes->connect('/add', ['action'=>'add'], ['_name'=>'add']); | |
$routes->connect('/edit/:id', ['action'=>'edit'], ['pass'=>['id'], 'id'=>'[[:xdigit:]-]+', '_name'=>'edit']); | |
$routes->connect('/profile/:id', ['action'=>'view'], ['pass'=>['id'], 'id'=>'[[:xdigit:]-]+', '_name'=>'profile']); |
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 | |
return $default = [ | |
'className' => 'Cake\Database\Connection', | |
'driver' => 'Cake\Database\Driver\Mysql', | |
'persistent' => false, | |
'host' => 'localhost', | |
/** | |
* CakePHP will use the default DB port based on the driver selected | |
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment |
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 | |
namespace IncCart\Controller\Component; | |
use Cake\Controller\Component; | |
/** | |
* Created by PhpStorm. | |
* User: Subhan Ahmed | |
* Date: 5/29/2016 |
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 Cake\Datasource\ConnectionManager; | |
$datasource_json = ROOT . DS . "plugins" . DS . "Settings" . DS . "config" . DS . "datasource.json"; | |
$content = json_decode(file_get_contents($datasource_json), true); | |
debug($content); | |
if(empty($content['password'])){ | |
$dsn = "mysql://".$content['username']."@".$content['host']."/".$content['database']; | |
} else{ | |
$dsn = "mysql://".$content['username'].":".$content['password']."@".$content['host']."/".$content['database']; |
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
isCodeExist(code: string): Observable<Job[]> { | |
return <Observable<Job[]>>this.afs | |
.collection(this.jobsCollection, ref => ref | |
.where('code', '==', code) | |
.limit(1) | |
) | |
.valueChanges() | |
.pipe( | |
flatMap(jobs => jobs), | |
catchError(err => throwError(err) |
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
import * as Constants from './build-constants'; | |
const environments = { | |
production: Constants.PRODUCTION, | |
staging: Constants.STAGING, | |
dev: Constants.DEV, | |
dev2: Constants.DEV2, | |
}; | |
const currentEnvironment = environments.staging; |
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
Subhans-MacBook-Pro:TVMLCatalog.xcodeproj subhanahmed$ xcodebuild -sdk appletvos -configuration Release -workspace project.xcworkspace -scheme TVMLCatalog build CODE_SIGN_STYLE=Manual | |
Build settings from command line: | |
CODE_SIGN_STYLE = Manual | |
SDKROOT = appletvos12.4 | |
note: Using new build system | |
note: Planning build | |
note: Using build description from disk | |
Build system information | |
warning: Provisioning profile "7plus tvOS TopShelf Distribution" for "TopShelf" contains entitlements that aren't in the entitlements file: com.apple.smoot.subscriptionservice. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile. (in target 'TopShelf') |
OlderNewer