Skip to content

Instantly share code, notes, and snippets.

View jesseleite's full-sized avatar

Jesse Leite jesseleite

View GitHub Profile
<?php
namespace App\DB\Listeners;
class Cascade
{
/**
* Trigger cascade function on Eloquent Model if defined in softdeletes config.
* @param object $model Eloquent Model
@jesseleite
jesseleite / job.md
Last active March 12, 2016 02:10
RoomRoster Intermediate to Senior Laravel Developer

Intermediate to Senior Laravel Developer

Who we are

RoomRoster is looking for full-time intermediate to senior Laravel developers to work on our product team. With over 20 years experience in sports event management, and a focus on the youth sport tournament market, RoomRoster was founded with one simple objective:

To create a valuable system for tournament directors to help streamline their event while delivering a consistent experience to their participants.

Must be willing to work on-site in London, Ontario, Canada.

// cURL replacement for file_get_contents()
// Safer alternative to enabling allow_url_fopen in php.ini :)
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);