This file contains hidden or 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 | |
function parseCss($css = array()) { | |
// Init | |
$return = array(); | |
// Set the break points here | |
$return['default'] = ''; | |
$return['tablet'] = '@media only screen and (max-width : 1024px) {'; | |
$return['phone'] = '@media only screen and (min-width : 320px) and (max-width : 480px) {'; |
This file contains hidden or 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
{ | |
"packageNames": [ | |
"illuminate/auth", | |
"illuminate/cache", | |
"illuminate/config", | |
"illuminate/console", | |
"illuminate/container", | |
"illuminate/cookie", | |
"illuminate/database", | |
"illuminate/encryption", |
This file contains hidden or 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
{ | |
"results": [ | |
{ | |
"name": "laravel/framework", | |
"description": "The Laravel Framework.", | |
"url": "https://packagist.org/packages/laravel/framework", | |
"downloads": 6493, | |
"favers": 4 | |
}, | |
{ |
This file contains hidden or 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
{ | |
"results": [ | |
{ | |
"name": "laravel/framework", | |
"description": "The Laravel Framework.", | |
"url": "https://packagist.org/packages/laravel/framework", | |
"downloads": 6493, | |
"favers": 4 | |
}, | |
{ |
This file contains hidden or 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
{ | |
"results": [ | |
{ | |
"name": "illuminate/database", | |
"description": "An elegant database abstraction library.", | |
"url": "https://packagist.org/packages/illuminate/database", | |
"downloads": 10787, | |
"favers": 1 | |
}, | |
{ |
This file contains hidden or 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 | |
/** | |
* Rule: strongPassword. Client requirements for a strong password | |
* | |
* @param string $field password | |
* @return boolean | |
*/ | |
public function strongPassword($field) { | |
// Set RegEx values | |
$rule_uppercase = '/[A-Z]/'; |
This file contains hidden or 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
<!-- Not the FULL view --> | |
<link rel="stylesheet" href="{{ url('css/sir-trevor-icons.css')}}" type="text/css"> | |
<link rel="stylesheet" href="{{ url('css/sir-trevor.css')}}" type="text/css"> | |
<!-- Using some Bootstrap here --> | |
<div class="container"> | |
<div class="row" id="post-form-container"> | |
<h3>Create A Post</h3> | |
<form method="post" action="form" id="post-form" role="form"> | |
<div class="form-group"> |
This file contains hidden or 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
/** | |
* Block for a Soundcloud link | |
*/ | |
SirTrevor.Blocks.Soundcloud = (function(){ | |
return SirTrevor.Block.extend({ | |
type: 'Soundcloud', | |
title: 'Soundcloud', |
This file contains hidden or 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 | |
public function parseGithub() | |
{ | |
// Get the URI segments. Example: http://github.com/github/repo | |
$url = explode('/', trim(parse_url($_GET['url'], PHP_URL_PATH), '/')); | |
// Add segments to API endpoint. The 1st segment is the user, the second the repo | |
$api_url = 'https://api.github.com/repos/' . $url[0] . '/' . $url[1]; | |
// Curl to get the json |
This file contains hidden or 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 for usernames | |
Route::group(['prefix' => '{username}', 'before' => 'valid-user'], function() | |
{ | |
Route::get('/', 'UserController@index'); | |
Route::get('about', 'UserController@about'); | |
}); | |
// Check to make sure the user is valid | |
Route::filter('valid-user', function($route, $request) |
OlderNewer