Keep this simple document up-to-date with any schema changes.
model: User
- id: bigincrements
- name: string
<?php | |
namespace Tests\Feature; | |
use App\Concerns\MakesRequests; | |
class HttpBinClient | |
{ | |
use MakesRequests; | |
protected $config = [ |
<?php | |
namespace Games; | |
use Arcade; | |
use App\User; | |
use Games\Models\Game; | |
use Illuminate\Http\Request; | |
class TicTacToe extends Cabinet { |
<?php | |
use Requests; | |
/** | |
* Instances of this class can be invoked with any of the HTTP request | |
* method names (get, post, put, delete, head, etc.), and doing so builds | |
* and invokes a request using the Requests library. | |
* @see https://github.com/rmccue/Requests | |
*/ | |
abstract RestClient { |
/*! | |
* Bootstrap v4.0.0-beta (https://getbootstrap.com) | |
* Copyright 2011-2017 The Bootstrap Authors | |
* Copyright 2011-2017 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
.w-25 { | |
width: 25% !important; | |
} |
Beginning with a baseline PHP workspace (LAMP).
From Cloud9's support forums:
$ sudo add-apt-repository ppa:ondrej/php -y
$ sudo apt-get update -y
$ sudo apt-get install php7.1-curl php7.1-dev php7.1-gd php7.1-intl php7.1-mcrypt php7.1-json php7.1-mysql php7.1-opcache php7.1-bcmath php7.1-mbstring php7.1-soap php7.1-xml
require "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension.rb" | |
class Php71Memcached < AbstractPhp71Extension | |
init | |
desc "Memcached via libmemcached library" | |
homepage "https://pecl.php.net/package/memcached" | |
head "https://github.com/php-memcached-dev/php-memcached.git", :branch => "php7" | |
option "with-sasl", "Build with sasl support" | |
<?php | |
namespace YourPlugin; | |
class YourPlugin extends \FatPanda\Illuminate\WordPress\Plugin | |
{ | |
/** | |
* You can't use the DB Facade, even though this would be syntactically | |
* valid in Laravel—the reason is that unlike in a Laravel App, in | |
* WordPress, there's potentially more than one Container per request— | |
* so the Facades can't know which Container they should ask to get |
<?php | |
// in your plugin's src/routes.php file | |
$router->rewrite('/some/arbitrary/url/{slug}', function($slug) { | |
// you can do anything here | |
update_option('option_name', $slug); | |
// if you return false, the request is over | |
//return false; | |
// if you return a string, WordPress will try to load a template by that name | |
return 'my-custom-template'; |
<?php | |
namespace YourPlugin; | |
use YourPlugin\Notifications\PostSaved; | |
/** | |
* Your plugin inherits everything that a Laravel container can do. | |
* Like, sending messages on Slack using Laravel's Notification framework. | |
*/ | |
class YourPlugin extends \FatPanda\Illuminate\WordPress\Plugin | |
{ | |
/** |