/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$posts = Post::paginate(20);
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\Http\Utilities; | |
class Country | |
{ | |
protected static $countries = [ | |
"United Kingdom" => "gb", | |
"United States" => "us", | |
"Canada" => "ca", |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
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 | |
/* | |
* find the n closest locations | |
* @param Model $query eloquent model | |
* @param float $lat latitude of the point of interest | |
* @param float $lng longitude of the point of interest | |
* @param float $max_distance distance in miles or km | |
* @param string $units miles or kilometers | |
* @param Array $fiels to return | |
* @return 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
<?php | |
namespace Craft; | |
return [ | |
'endpoints' => [ | |
'api/jobs.json' => [ | |
'elementType' => 'Entry', | |
'criteria' => ['section' => 'jobs'], | |
'transformer' => function(EntryModel $entry) { | |
return [ |
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
@@ table desktopBrowsers | |
| browser | gridArgs | | |
| Firefox | --dc.browser "Firefox" --dc.browser_version "46" --dc.os "WINDOWS" --dc.os_version "10" --dc.browserstack.local true | |
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
var gulp = require('gulp'); | |
var imagemin = require('gulp-imagemin'); | |
gulp.task('img', function() { | |
return gulp.src('./assets/images/*') | |
.pipe(imagemin({ progressive: true })) | |
.pipe(gulp.dest('./assets/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
{% for history in order.histories %} | |
Status: '{{ history.newStatus }}' (previously '{{ history.prevStatus }}') | |
with message: '{{ history.message }}'<br> | |
{% endfor %} |
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
/* | |
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | |
For licensing, see LICENSE.md or http://ckeditor.com/license | |
*/ | |
CKEDITOR.addTemplates("default", { | |
imagesPath: CKEDITOR.getUrl("/build/wygwam/"), | |
templates: [{ | |
title: "Image on left with caption", | |
image: "img-left.png", | |
description: "Add an image on the left with caption", |