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 controllers; | |
/** | |
* Description of Controller | |
* | |
* @author Glenn | |
*/ | |
class Controller { |
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 controllers; | |
/** | |
* Description of Auth | |
* | |
* @author Glenn | |
*/ | |
class Auth extends \controllers\Controller { |
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
$route = $app->router()->getNamedRoute($route_name); | |
$route->setParams($param); | |
ob_start(); | |
$route->dispatch(); | |
$contents = ob_get_clean(); |
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 | |
/* Show all and featured ideas routes */ | |
$app->get('/', 'Idiaz\Action\IdeasBrowseAction:__invoke')->name('ideas'); | |
$app->get('/ideas', 'Idiaz\Action\IdeasFeaturedAction:__invoke')->name('ideas.featured'); | |
/* New idea routes */ | |
$app->get('/ideas/new', 'Idiaz\Action\IdeasCreateAction:__invoke')->name('ideas.create'); | |
$app->post('/ideas/new', 'Idiaz\Action\IdeasStoreAction:__invoke')->name('ideas.store'); | |
/* Show a route */ | |
$app->get('/ideas/:id', 'Idiaz\Action\IdeasShowAction:__invoke')->name('ideas.show'); | |
/* Editing idea routes */ |
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
"autoload": { | |
"psr-0": { | |
"VMS" : "src/" | |
} | |
} |
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
Capsule::connection() | |
->table('jobs') | |
->join('job_codes', 'jobs.id', '=', 'job_codes.job_id') | |
->join('codes', 'codes.id', '=', 'job_codes.code_id') | |
->where('date', '=', $date, 'and') | |
->where('user_id', '=', $pein) | |
->select("*"); |
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 VMS\Traits; | |
trait UserRelationshipTrait { | |
/** | |
* @return \Illuminate\Database\Eloquent\Relations\HasOne | |
*/ | |
public function users() { | |
return $this->hasOne("VMS\Models\User"); |
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
RewriteEngine On | |
# Some hosts may require you to use the `RewriteBase` directive. | |
# If you need to use the `RewriteBase` directive, it should be the | |
# absolute physical path to the directory that contains this htaccess file. | |
# | |
# RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [QSA,L] |
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 | |
class UserTest extends \PHPUnit_Framework_TestCase { | |
/** | |
* | |
* @var GuzzleHttp\Client | |
*/ | |
private $client; | |
public function setUp() { |
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 Space; | |
class RouteManager { | |
public function __construct() { | |
$app = \Slim\Slim::getInstance(); | |
$app->get('/', function () { | |
print "hi"; | |
}); |
OlderNewer