The admin controller will extend the Laravel base controller and be crazy smart about things. If you return a string or view object, then it will be injected in the content of the BlockCMF admin layout. This allows you to program like a usual Laravel controller with your own internal layouts, sub-views, view composers, and everything and not having to be bothered about remembering to follow some weird API to make sure you inject your view into the layout. Just extend the AdminBaseController and go to town!
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 Initr\Services; | |
use Illuminate\Validation\Factory as LaravelValidator; | |
abstract class Validator | |
{ | |
protected $validator; | |
protected $data = array(); |
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
{ | |
"require": { | |
"slim/slim": "2.*", | |
"slim/views": "0.1.*", | |
"twig/twig": "1.15.0", | |
"monolog/monolog": "1.7.0", | |
"resty/resty": "0.6.0", | |
"vlucas/valitron": "dev-master#e011ab81c43903e73b766620828877b828e65380", | |
"j4mie/idiorm": "v1.4.1", | |
"j4mie/paris": "v1.4.2", |
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
// thanks to @raganwald | |
function spread(fn) { | |
return Function.apply.bind( fn, null ); | |
} | |
function foo(x,y,z) { | |
console.log(x,y,z); | |
} | |
function bar(fn) { |
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 | |
/* | |
This User model handles everything related to users. Most of the code is | |
ommitted, because it's not relevant to this example. | |
*/ | |
class User | |
{ | |
public static function loadUserByCredentials($username, $password) |
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
{ | |
"require": { | |
"illuminate/foundation": ">=1.0.0", | |
"illuminate/auth": ">=1.0.0", | |
"illuminate/database": ">=1.0.0", | |
"illuminate/view": ">=1.0.0", | |
"amazonwebservices/aws-sdk-for-php": "1.5.*", | |
"codeguy/upload": "*", | |
"sybio/image-workshop" : "*", |
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 | |
$connection = Illuminate\Database\Connectors\ConnectionFactory::make([ | |
'driver' => 'mysql', | |
'host' => '', | |
'database' => '', | |
'username' => '', | |
'password' => '', | |
'charset' => '', | |
'prefix' => '', |
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
// --------------------------------------------------------------------------------- | |
// CSS Image Paths | |
// --------------------------------------------------------------------------------- | |
$bg-img-path: '/path/to/images/'; // Base Path for BG Layout Images |
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 | |
if ( ! defined('IS_WIN')) { | |
define('IS_WIN', (DIRECTORY_SEPARATOR === '\\')); | |
} | |
/** | |
* Normalizes and joins path segments in accordance with the current OS standard. | |
* | |
* Usage: | |
* |
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
(function (window, document) { | |
'use strict'; | |
var $, Imager; | |
window.requestAnimationFrame = | |
window.requestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.webkitRequestAnimationFrame || |
OlderNewer