Skip to content

Instantly share code, notes, and snippets.

View harini-ua's full-sized avatar
🏠
Working from home

Sergey Harini harini-ua

🏠
Working from home
View GitHub Profile
<?php
include_once 'conf.php';
$row = '';
$link = getConnection();
$page = 1;
$pageinlist = 2;
$status = "ASC";
<?php
/**
* Returns a summary of thep rovided text
* @param [type] $text $text to be summarized
* @param integer $length lenght in chars to keep
* @return [type] summarized text
*/
function summary($text, $length = 200)
{
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Excel;
use Storage;
class ImportContacts extends Command
{
public $contact_imported = 0;
public $contact_not_imported = 0;
/**
<?php
namespace App\Helpers;
class EmojiHelper
{
const SEEK_LEFT_DELIMITER = 0x00;
const SEEK_RIGHT_DELIMITER= 0x01;
protected $emoji = array(
//People
"100",
"bowtie",
<?php
namespace Orchid\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Orchid\Core\Models\User;
use Orchid\Kernel\Dashboard;
class CreateAdminCommand extends Command
{
/**
* The console command name.
<?php
// migrations
Schema::create('subscriptions', function ($table) {
$table->increments('id');
$table->integer('user_id');
$table->string('name');
$table->string('stripe_id');
$table->string('stripe_plan');
<?php
namespace App\Helpers;
use Intervention\Image\Facades\Image;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Config;
/**
* Class ImageHelper
* @package App\Helpers
*/
class ImageHelper
<?php
namespace App\Helpers;
/**
* Class StringHelper
* @package App\Helpers
*/
class StringHelper
{
/**
* Replaces all special characters with underscores
<?php
// FooterComposer.php
namespace App\Http\ViewComposers;
use App\Repositories\StaticPageRepository;
use Illuminate\View\View;
/**
* Class FooterComposer
* @package App\Http\ViewComposers
<?php
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
// Get single Parameters