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 | |
/** | |
* Filter the model using value. | |
* | |
* @param Builder $builder | |
* @param $value | |
* @return mixed | |
*/ | |
public function filter(Builder $builder, $value, $direction) |
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 | |
function create($class, $attributes = [], $times = null) | |
{ | |
return factory($class, $times)->create($attributes); | |
} | |
function make($class, $attributes = [], $times = null) | |
{ | |
return factory($class, $times)->make($attributes); |
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
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true |
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 Tests; | |
use App\Exceptions\Handler; | |
use Illuminate\Contracts\Debug\ExceptionHandler; | |
trait ExceptionHandling | |
{ | |
protected function setUp() |
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 Tests; | |
trait FactoryHelpers | |
{ | |
public function create($class, $attributes = [], $times = null) | |
{ | |
return factory($class, $times)->create($attributes); | |
} |
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
// Determine if an element is in the visible viewport | |
export default function isInViewport(element) { | |
var rect = element.getBoundingClientRect(); | |
var html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) | |
); |
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
/** | |
* Create a new user instance after a valid registration. | |
* | |
* @param array $data | |
* @return User | |
*/ | |
protected function create($connection, array $data) | |
{ | |
$user = new User(); |
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
var elixir = require('laravel-elixir'); | |
elixir.config.css.sass.pluginOptions.includePaths = [ | |
'node_modules/bootstrap/scss', | |
]; | |
elixir(function(mix) { | |
mix.sass('app.scss') | |
.browserify('app.js') | |
.version(['css/app.css', 'js/app.js']) |
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 App; | |
class BladeDirective | |
{ | |
protected $cache; | |
public function __construct(RussianCache $cache) | |
{ |
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
for ($i = 0; $i < 10; i++) { | |
// Do something | |
} | |
// Much better looking | |
foreach (range(0,9) as $i) { | |
// Do something | |
} |
NewerOlder