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 | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateSurveyQueriesTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
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\BlueRock\Services; | |
use App\Customer; | |
class Telecom0545Service | |
{ | |
public function resellersUpdate() | |
{ |
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
public function wlrRules() | |
{ | |
$file_ids = [ | |
5, | |
15, | |
17, | |
23, | |
47, | |
50, |
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
public function handle() | |
{ | |
$path = 'import'; | |
$filename = 'sepa.csv'; | |
$content = Storage::disk('ftp')->get($path . '/' . $filename); | |
Storage::disk('local')->makeDirectory($path); |
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
public function resellersUpdate() | |
{ | |
$item_id = 69; | |
Customer::where('isReseller', true) | |
->chunk(10, function($customers) use ($item_id) { | |
foreach ($customers as $customer) { | |
$count = 0; |
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
if ( ! function_exists('get3CXDateFormat')) { | |
function get3CXDateFormat($date) | |
{ | |
list($day, $hour, $a) = explode(' ', $date); | |
list ($day, $month, $year) = explode('/', $day); | |
list($h, $m, $s) = explode(':', $hour); |
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 | |
// this needs to be completely redesigned | |
// some parts can give you an idea of | |
// how was working the old system | |
Class StopWatch | |
{ | |
private $eventsTypes = array( | |
'start', |
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\Console\Commands; | |
use App\Term; | |
use Carbon\Carbon; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Storage; | |
use League\Csv\Writer; | |
use Nathanmac\Utilities\Parser\Parser; |
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
function splitEmailsByAttachmentWeightLimit(array $attachments, $weightLimit = 25) | |
{ | |
$distinctEmails = []; | |
$attached = []; | |
arsort($attachments); | |
foreach ($attachments as $key => $value) { | |
if ( ! in_array($key, $attached)) { |
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
$attachments = [ | |
0 => 4, | |
1 => 4, | |
2 => 5, | |
3 => 9, | |
4 => 8, | |
5 => 7, | |
]; |