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
{ | |
"name": "project", | |
"version": "0.0.0", | |
"authors": [ | |
"Eric Barnes <me@example.org>" | |
], | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", |
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
@foreach (array_slice($posts->toArray(), 0, 5) as $post) | |
<h1>{{ $post['title'] }}</h1> | |
@endforeach |
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 App\Services; | |
use App\Post; | |
class Slug | |
{ | |
/** | |
* @param $title |
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
/** | |
* Stringify attributes for use in html tags. | |
* | |
* Helper function used to convert an array or object of | |
* attributes to a string | |
* | |
* @param mixed | |
* @return string | |
*/ | |
function _stringify_attributes($attributes, $js = FALSE) |
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
{ | |
"directory": "vendor/bower_components" | |
} |
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
/** | |
* Filter to check for CSRF attacks from the ajax requests. | |
*/ | |
Route::filter('csrf_header', function() | |
{ | |
if (Session::token() != Request::header('x-csrf-token')) | |
{ | |
throw new Illuminate\Session\TokenMismatchException; | |
} | |
}); |
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 App\Console\Commands; | |
use Illuminate\Console\Command; | |
class PewPewPew extends Command | |
{ | |
protected $signature = 'pewpewpew'; | |
protected $description = 'Command description'; |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name site.com; | |
root /home/forge/site.com; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl on; | |
# ssl_certificate; | |
# ssl_certificate_key; |
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
$(document).ready(function() { | |
$("button.remove").on('click', function(e){ | |
e.preventDefault(); | |
if ( ! confirm('Are you sure?')) { | |
return false; | |
} | |
var action = $(this).data("action"); | |
var parent = $(this).parent(); | |
$.ajax({ | |
type: 'delete', |
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
this.selectize = this.$("#js-tags").selectize({ | |
persist: true, | |
maxItems: null, | |
valueField: "tag", | |
labelField: "tag", | |
searchField: ["tag"], | |
options: tags.toJSON(), // Backbone collection | |
render: { | |
item: function(item) { | |
return "<div><i class='icon-tag'></i> " + item.tag + "</div>"; |
NewerOlder