We can see we have php 7.0 available out of the box:
sudo apt-cache show php-cli
Instead of using that, we'll start by installing the latest PHP 7.1, via the populate PHP repository.
<?php | |
use Illuminate\Support\Arr; | |
trait CanBeReplicated | |
{ | |
public function replicateTo(string $model, array $with = null, array $except = null) | |
{ | |
$defaults = [ | |
$this->getKeyName(), |
We can see we have php 7.0 available out of the box:
sudo apt-cache show php-cli
Instead of using that, we'll start by installing the latest PHP 7.1, via the populate PHP repository.
<template> | |
<div class="users"> | |
<div v-if="error" class="error"> | |
<p>{{ error }}</p> | |
</div> | |
<ul v-if="users"> | |
<li v-for="{ id, name, email } in users"> | |
<strong>Name:</strong> {{ name }}, | |
<strong>Email:</strong> {{ email }} |
This gist was getting a lot of comments/questions, but since there are no notifications when someone replies to a gist, I've moved the setup instructions and a bunch of sample code to a dedicated Github repo.
<?php | |
/////////////////////////////////////////////////// | |
// STEP 1 - CREATE CLASS THAT WILL BE USED GLOBALY | |
/////////////////////////////////////////////////// | |
namespace App\MyApp; | |
class MyApp { | |
public function sayHello($data = []) | |
{ | |
echo "Hello World from Facade!"; | |
} |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
<?php | |
namespace PHPSTORM_META { | |
/** | |
* PhpStorm Meta file, to provide autocomplete information for PhpStorm | |
* Generated on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ |