Skip to content

Instantly share code, notes, and snippets.

View MehulBawadia's full-sized avatar

Mehul Bawadia MehulBawadia

View GitHub Profile
@MehulBawadia
MehulBawadia / routes.php
Created June 16, 2017 05:06
Reboot the Laravel Application from scratch
<?php
/**
* Reboots the entire application from the scratch.
*
* Removes the all the records from the database table,
* except the migrations table.
*
* Deletes the directories (if provided)
*
@MehulBawadia
MehulBawadia / CreateDirectoryIfNotExist.php
Created April 3, 2017 10:05
A simple trait for creating a directory in PHP
<?php
/**
* A simple trait for creating a directory.
*
* It can be used anywhere in/by the application.. It is specially
* recommended to use this for creating directories of user based
* folders at the time of user registration.
*
* @author IamCrazyD <[email protected]>
@MehulBawadia
MehulBawadia / timezones_list.php
Created June 27, 2016 08:15
The timezone list for select box
<?php
/*
* The below code is taken from the StackOverlow
* http://stackoverflow.com/questions/1727077/generating-a-drop-down-list-of-timezones-with-php
*/
function timezone_list() {
static $timezones = null;