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\Feature; | |
use Tests\DuskTestCase; | |
use Laravel\Dusk\Concerns\ProvidesBrowser; | |
class LoginTest extends DuskTestCase | |
{ | |
use ProvidesBrowser; // 1. Import this trait to your test |
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 CustomerAddress extends Model { | |
protected function setKeysForSaveQuery(Builder $query) | |
{ | |
$query | |
->where('Customer_No', '=', $this->getAttribute('Customer_No')) | |
->where('Address_Name', '=', $this->getAttribute('Address_Name')); |
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 Resource extends Model { | |
protected function setKeysForSaveQuery(Builder $query) | |
{ | |
$query | |
->where('pk_1', '=', $this->getAttribute('pk_1')) | |
->where('pk_2', '=', $this->getAttribute('pk_2')); |
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\Http\Controllers; | |
use App\Http\Requests\Register; | |
use App\Repositories\UserRepository; | |
use App\Transformers\UserTransformer; | |
class UsersController | |
{ |
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\Http\Controllers; | |
class UsersController | |
{ | |
public function register() | |
{ | |
// validate inputs | |
$validator = \Validator::make([ |
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 Foo\Cart; | |
use Foo\CartItem; | |
use Foo\FreshMilk; | |
use Foo\ThisConditionReturnItemInterface; | |
class FreeFreshMilkWhenByAmericanoEspresso implements ThisConditionReturnItemInterface | |
{ | |
$needToBuyBothToGetFreeFreshMilk = false; |
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 Search | |
{ | |
private $updateStart; | |
private $updateEnd; | |
private $entryCompleted; | |
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 | |
// cool previous code | |
public function handler() | |
{ | |
$bar = Partyline::getOutput(); | |
Search::onUpdateStart(function($totalEntries) use (&$bar) { | |
Partyline::line('Updating the index...'); |
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 Search | |
{ | |
public function update() | |
{ | |
Partyline::line('Updating the index...'); | |
$entries = Entry::all(); | |
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 | |
// previous code | |
public function handle() | |
{ | |
$this->line('Updating the index...'); | |
Search::update(); // ¯\_(ツ)_/¯ |
NewerOlder