brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
<?php | |
$a = array(1, 2, 3); | |
$pairs = array_map(null, $a, array_slice($a, 1)); | |
/** | |
* Prints: | |
* (1,2)(2, 3)(3, ) | |
*/ | |
foreach ($pairs as list($x, $y)) { | |
echo "({$x}, {$y})"; |
<?php | |
// Converts a number into a short version, eg: 1000 -> 1k | |
// Based on: http://stackoverflow.com/a/4371114 | |
function number_format_short( $n, $precision = 1 ) { | |
if ($n < 900) { | |
// 0 - 900 | |
$n_format = number_format($n, $precision); | |
$suffix = ''; | |
} else if ($n < 900000) { |
<scheme name="laracasts-theme-updated" version="142" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.7" /> | |
<option name="EDITOR_FONT_SIZE" value="15" /> | |
<option name="CONSOLE_FONT_NAME" value="Menlo" /> | |
<option name="CONSOLE_FONT_SIZE" value="10" /> | |
<option name="CONSOLE_LINE_SPACING" value="1.4" /> | |
<option name="EDITOR_FONT_NAME" value="Menlo" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="292d38" /> | |
<option name="ANNOTATIONS_COLOR" value="8b999f" /> |
<?php | |
namespace App\Http\Controllers\Api; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Http\Request; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
abstract class ApiController extends Controller |
<?php | |
namespace Tests; | |
trait CanAssertFlash | |
{ | |
protected function assertFlash($level, $message, $important = false, $title = null, $overlay = false) | |
{ | |
$expectedNotification = [ | |
'title' => $title, |
<?php | |
namespace App\Http\Livewire; | |
use App\Customer; | |
use Livewire\Component; | |
class Multiform extends Component | |
{ | |
public $name; |