Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
JeffreyWay / CommunityLinksQuery.php
Created August 3, 2016 20:12
Consider Query Objects source.
<?php
namespace App\Queries;
use App\CommunityLink;
class CommunityLinksQuery
{
/**
* Fetch all relevant community links.
<?php
class Collection implements IteratorAggregate
{
/**
* The collection contents.
*
* @var array
*/
protected $items;
@JeffreyWay
JeffreyWay / laravel-elixir-webpack.js
Last active February 9, 2019 04:31
Laravel Elixir Webpack Extension
var gulp = require('gulp');
var gulpWebpack = require('webpack-stream');
var Elixir = require('laravel-elixir');
var $ = Elixir.Plugins;
var config = Elixir.config;
/*
|----------------------------------------------------------------
| Webpack Compilation
@lukevers
lukevers / LaravelInterviewQuestions.md
Created October 23, 2015 15:23
Laravel Interview Questions

Laravel 5 Interview Questions

This is a compiled list of Laravel interview questions. If Laravel is an engineer's PHP framework of choice, they definitely have potential to be a good candidate, but a lot of new PHP engineers have been into Laravel too. The framework itself is very welcoming to newcomers, which makes it easy for beginners to feel that they know more than they really do.

General Questions

1. How long have you been using Laravel?

This question can help decide what level of questions to ask.

@loren138
loren138 / .rocketeerconfig.php
Last active January 17, 2021 08:26
MySQL Master Slave and EC2 Laravel Notes with Rocketeer
<?php
use Rocketeer\Services\Connections\ConnectionsHandler;
return [
// The name of the application to deploy
// This will create a folder of the same name in the root directory
// configured above, so be careful about the characters used
'application_name' => 'resources',
@JeffreyWay
JeffreyWay / PjaxMiddleware.php
Last active November 6, 2024 14:26
Laravel middleware for working with pjax.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
@matula
matula / awesm.md
Last active February 19, 2024 16:23
Awesome PHP stuff in one Gist
@vluzrmos
vluzrmos / App_Http_VideoStream.php
Last active October 22, 2024 21:47
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@JeffreyWay
JeffreyWay / ex.js
Created June 23, 2015 22:12
Laracasts.com Episode: Algolia + JavaScript + Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Algolia with JS</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
@JeffreyWay
JeffreyWay / ex.php
Last active February 9, 2019 05:16
<?php
$router->get('dogs', ['uses' => 'App\Http\Controllers\DogsController@index', 'domain' => NULL, 'as' => 'dogs_path', 'middleware' => array (
0 => 'auth',
), 'where' => array (
)]);
$router->get('/', ['uses' => 'App\Http\Controllers\HomeController@home', 'domain' => NULL, 'as' => NULL, 'middleware' => array (
), 'where' => array (
)]);
$router->get('about', ['uses' => 'App\Http\Controllers\HomeController@about', 'domain' => NULL, 'as' => NULL, 'middleware' => array (