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
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Events\Dispatcher; | |
use Illuminate\Container\Container; | |
$capsule = new Capsule; | |
$capsule->addConnection([ | |
"driver" => "mysql", | |
"host" => "localhost", | |
"database" => "slim", | |
"username" => "root", |
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 | |
/* | |
Plugin Name: My Plugin | |
Plugin URI: http://example.com/wordpress-plugins/my-plugin | |
Description: A brief description of my plugin | |
Version: 1.0 | |
Author: Author Name | |
Author URI: http://example.com | |
License: GPLv2 | |
*/ |
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
var myApp = angular.module('myApp',[]); | |
myApp.controller('CartController', function($scope){ | |
// Logic goes here | |
}); | |
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
<!DOCTYPE html> | |
<html lang="en" ng-app> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Title Page</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.24/angular.min.js"></script> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> |
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
/** | |
* Remove the site description | |
* Put it into child theme functions.php | |
*/ | |
remove_action ('genesis_site_description','genesis_seo_site_description' ); |
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 | |
// Start the engine | |
require_once( get_template_directory() . '/lib/init.php' ); | |
// Child theme (do not remove) | |
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' ); | |
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' ); | |
// Add Viewport meta tag for mobile browsers | |
add_action( 'genesis_meta', 'sample_viewport_meta_tag' ); |
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
/* | |
Theme Name: Theme Name | |
Description: This is the sample theme created for the Genesis Framework. | |
Author: Author name | |
Author URI: | |
Version: 1.9 | |
Tags: black, orange, white, one-column, two-columns, three-columns, fixed-width, custom-menu, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready | |
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
{{ | |
Form::field([ | |
"type" => "text", | |
"name" => "atrributeName", | |
"label" => "LabelName", | |
"form" => $form, | |
"placeholder" => "placeholder", | |
"value" => $group->valueName | |
]) | |
}} |
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
{{ Form::open(array('action' => 'NameController@actionName', 'class' => 'form-horizontal' , 'role' => 'form')) }} | |
{{ Form::submit('Save', array('class' => 'btn btn-success btn-small')) }} | |
{{ Form::close() }} |
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 passwordStrengthOk($attribute, $params) | |
{ | |
// default to true | |
$valid = true; | |
// at least one number | |
$valid = $valid && preg_match('/.*[\d].*/', $this->$attribute); | |
// at least one non-word character | |
$valid = $valid && preg_match('/.*[\W].*/', $this->$attribute); | |
// at least one capital letter |