This file contains 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 { Injectable, OnDestroy } from '@angular/core'; | |
import { environment } from '@environments/environment'; | |
import * as LaunchDarkly from 'launchdarkly-js-client-sdk'; | |
import { LDFlagValue } from 'launchdarkly-js-client-sdk'; | |
import { Observable, Subject } from 'rxjs'; | |
import { map } from 'rxjs/operators'; | |
@Injectable({ | |
providedIn: 'root' | |
}) |
This file contains 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
Promotion Stepper | |
Step 1 | |
select deals -> Deals Stepper | |
select new vendor -> New Vendor Stepper | |
Deals Stepper | |
Deals Step 2 | |
next -> Deals Step 3 | |
Deals Step 3 |
This file contains 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 Config; | |
use DB; | |
use Illuminate\Http\Request; | |
use App\Models\Quote; | |
use App\Models\QuoteOfTheDay; | |
class QuoteController extends Controller | |
{ | |
/** |
This file contains 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 | |
App::before(function($request) { | |
if ($request->getMethod() == 'OPTIONS') { | |
$response = Response::make('', 204); | |
$response->header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS'); | |
$response->header('Access-Control-Allow-Origin', '*'); | |
$response->header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization'); | |
return $response; | |
} |
This file contains 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 | |
Collection::macro('maxBy', function ($callback) { | |
$callback = $this->valueRetriever($callback); | |
return $this->reduce(function ($result, $item) use ($callback) { | |
if ($result === null) { | |
return $item; | |
} | |
return $callback($item) > $callback($result) ? $item : $result; |
This file contains 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\Merge; | |
class Marge | |
{ | |
protected $data = []; | |
public function setData($data) | |
{ |