Skip to content

Instantly share code, notes, and snippets.

Mirza mirzabusatlic

View GitHub Profile
@mirzabusatlic
mirzabusatlic / FixCashierNamespace.php
Last active Oct 21, 2018
Add a sub-namespace to Laravel Cashier when using both Stripe and Braintree packages
View FixCashierNamespace.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Finder\Finder;
class FixCashierNamespace extends Command
{
/**
@mirzabusatlic
mirzabusatlic / 00.howto_install_phantomjs.md
Last active Dec 21, 2016 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 2.1.1

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@mirzabusatlic
mirzabusatlic / ClassifiesDeleted.php
Created Jun 15, 2016
Classifies between soft/hard deletion in model observers in Laravel
View ClassifiesDeleted.php
<?php
namespace Watermark\Observers;
use Illuminate\Database\Eloquent\Model;
trait ClassifiesDeleted
{
/**
* Hook into post-delete operations.
@mirzabusatlic
mirzabusatlic / PreventOnProduction.php
Created Apr 5, 2016
Prevent a Laravel Artisan command from executing on a production server
View PreventOnProduction.php
<?php
namespace App\Console;
trait PreventOnProduction
{
/**
* Prevent the command from executing on production.
*
* @param string $message
You can’t perform that action at this time.