This file contains hidden or 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 | |
use Eloquence\Behaviours\CountCache\CountedBy; | |
use Eloquence\Behaviours\CountCache\HasCounts; | |
use Illuminate\Database\Eloquent\Model; | |
class Post extends Model { | |
use HasCounts; | |
#[CountedBy] |
This file contains hidden or 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 | |
'cloud' => env('FILESYSTEM_CLOUD', 'do'), | |
.. | |
'do' => [ | |
'driver' => 's3', | |
'key' => env('DO_ACCESS_KEY_ID'), | |
'secret' => env('DO_SECRET_ACCESS_KEY'), |
This file contains hidden or 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 | |
class Player | |
{ | |
public function upgrade(Building $building) | |
{ | |
if (!$this->canAfford($building)) { | |
throw new DamnImBroke; | |
} | |
$this->deduct($building->upgradeCosts()); |
This file contains hidden or 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 IronSteel\Construction; | |
use IronSteel\Library\Uuid; | |
class BuildingId extends Uuid | |
{ | |
} |
This file contains hidden or 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
import Unauthorised from './Unauthorised' | |
export default function() { | |
return { | |
response: function(response) { | |
switch (response.status) { | |
case 401: return Unauthorised.handle(); | |
} | |
return response; |
This file contains hidden or 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
// parent | |
<template> | |
<header class="content-header"> | |
<h1 class="h2 first">Track workout</h1> | |
</header> | |
<div> | |
<ul class="exercises"> | |
<li class="exercise" v-for="exercise in exercises" track-by="$index" transition="item"> | |
<div class="col-sm-6 col-xs-12 selector"> | |
<button class="btn btn-default" v-on:click="selectExercise()">Select exercise</button> |
This file contains hidden or 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 AwardForce\Library\Exceptions; | |
use AwardForce\Library\Http\FormInputOutdatedException; | |
use AwardForce\Library\Http\Messaging; | |
use AwardForce\Library\Traits\Respondable; | |
use AwardForce\Modules\Accounts\AccountNotFoundException; | |
use Exception; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
use Illuminate\Http\Response; |
This file contains hidden or 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
class XSSProtection | |
{ | |
/** | |
* The following method loops through all request input and strips out all tags from | |
* the request. This to ensure that users are unable to set ANY HTML within the form | |
* submissions, but also cleans up input. | |
* | |
* @param Request $request | |
* @param callable $next | |
* @return mixed |
This file contains hidden or 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 Modules\User\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class UpdateUserRequest extends FormRequest | |
{ | |
public function rules() | |
{ | |
return [ | |
'email' => "required|email|unique:users,email,{$this->user->id}", |
This file contains hidden or 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
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
use Illuminate\Pipeline\Pipeline; | |
class Kernel extends HttpKernel | |
{ | |
/** | |
* The application's global HTTP middleware stack. | |
* | |
* @var array | |
*/ |
NewerOlder