Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Connectors\Zest\ApiModels;
use App\ApiModels\Category as BaseCategory;
/**
* class Category
*
* Convert API response to App\ApiModels\Category
<?php
namespace App\ApiModels;
use App\Traits\CanAccessProperties;
/**
* class BaseApiModel
*
* The base class for all the models
#items: array:17 [
"defaultOptions" => ""
"discount" => ""
"featured" => ""
"image" => "https://images.zeald.com/site/neptunescicd3-dev/images/items/PURE_EGYPTIAN_COTTON_Website_1024x1024.1.jpg"
"inactive" => "0"
"link" => "https://neptunescicd3-dev.zes.zeald.com/shop/Bedlinen/Sheets++Pillow+Cases/Pure_Egyptian_Cotton_Sheets/x_sku/04074.html"
"option" => Illuminate\Support\Collection {#1578
#items: array:9 [
"code" => "04074-Sizes"
/// PRODUCT Data type
<?php
namespace App\DataTypes;
/**
* class Product
*
* Represent the Product type for the shopbot
<?php
namespace App\Conversations;
use Illuminate\Support\Arr;
use App\Extensions\Elements\Button;
use App\Extensions\Elements\Buttonset;
use BotMan\BotMan\Messages\Incoming\Answer;
/**
@basherr
basherr / Email Controller
Created December 10, 2020 07:54
Composing email
public function send(
SendEmailRequest $request,
Email $email,
EmailBuilder $emailBuilder,
OutgoingEmailQueue $emailQueue
)
{
$from = auth()->user()->email;
const fs = require('fs');
const path = require('path');
const FONTAWESOME_ICONS = [ "fab fa-500px","fas fa-abacus","far fa-abacus","fal fa-abacus","fad fa-abacus","fab fa-accessible-icon","fab fa-accusoft","fas fa-acorn","far fa-acorn","fal fa-acorn","fad fa-acorn","fab fa-acquisitions-incorporated","fas fa-ad","far fa-ad","fal fa-ad","fad fa-ad","fas fa-address-book","far fa-address-book","fal fa-address-book","fad fa-address-book","fas fa-address-card","far fa-address-card","fal fa-address-card","fad fa-address-card","fas fa-adjust","far fa-adjust","fal fa-adjust","fad fa-adjust","fab fa-adn","fab fa-adobe","fab fa-adversal","fab fa-affiliatetheme","fas fa-air-conditioner","far fa-air-conditioner","fal fa-air-conditioner","fad fa-air-conditioner","fas fa-air-freshener","far fa-air-freshener","fal fa-air-freshener","fad fa-air-freshener","fab fa-airbnb","fas fa-alarm-clock","far fa-alarm-clock","fal fa-alarm-clock","fad fa-alarm-clock","fas fa-alarm-exclamation","far fa-alarm-exclamation","fal fa-alarm-excl
<?php
namespace App\ProxyEmail;
use Illuminate\Support\Collection;
/**
* class EmailBuilder
*
* build recipients and prepare outgoing emails
@basherr
basherr / filename.sh
Created March 19, 2018 10:32
shell cron job commands
#!/bin/bash
cd /var/www/html/folder
PATH=$PATH:/usr/local/bin
export PATH
export DISPLAY=:5
php artisan queue:flush #run any command
@basherr
basherr / karma.config.js
Created January 3, 2018 07:40
Karma, PhantomJS and Mocha Setup
const path = require("path");
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "",
client: {
mocha: {
reporter: "html",