This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://css.dzone.com/articles/cool-things-learn-about | |
http://www.developed.be/2013/08/30/laravel-4-pivot-table-example-attach-and-detach/ | |
http://code.tutsplus.com/tutorials/authentication-with-laravel-4--net-35593 | |
GETTING LISTED APPROVED SCHOOLS | |
$categories = array(); | |
foreach (School::whereApproved(1)->get() as $category) { | |
$categories[$category->id] = $category->name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This javascript file checks for the brower/browser tab action. | |
* It is based on the file menstioned by Daniel Melo. | |
* Reference: http://stackoverflow.com/questions/1921941/close-kill-the-session-when-the-browser-or-tab-is-closed | |
------------------------------------------------------------------------------------------------- | |
http://eureka.ykyuen.info/2011/02/22/jquery-javascript-capture-the-browser-or-tab-closed-event/ | |
------------------------------------------------------------------------------------------------- | |
*/ | |
var validNavigation = false; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://forumsarchive.laravel.io/viewtopic.php?pid=47877 | |
http://stackoverflow.com/questions/18102537/pass-parameters-in-insert-query-stored-procedure-in-laravel-4 | |
http://stackoverflow.com/questions/16982381/laravel-4-call-mysql-stored-procedure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DateFormat { | |
const DATE_SHORT = 'Y-m-d'; | |
const DATE_LONG = 'F j, Y'; | |
const DATETIME_SHORT = 'Y-m-d H:i'; | |
const DATETIME_LONG = 'F j, Y, g:i a'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array( | |
array('abbr'=>'BIT', 'name'=>'Baker Island Time', 'utc'=>'UTC-12'), | |
array('abbr'=>'NUT', 'name'=>'Niue Time', 'utc'=>'UTC-11'), | |
array('abbr'=>'SST', 'name'=>'Samoa Standard Time', 'utc'=>'UTC-11'), | |
array('abbr'=>'CKT', 'name'=>'Cook Island Time', 'utc'=>'UTC-10'), | |
array('abbr'=>'HAST', 'name'=>'Hawaii-Aleutian Standard Time', 'utc'=>'UTC-10'), | |
array('abbr'=>'HST', 'name'=>'Hawaii Standard Time', 'utc'=>'UTC-10'), | |
array('abbr'=>'TAHT', 'name'=>'Tahiti Time', 'utc'=>'UTC-10'), | |
array('abbr'=>'MART', 'name'=>'Marquesas Islands Time', 'utc'=>'UTC-09:30'), | |
array('abbr'=>'MIT', 'name'=>'Marquesas Islands Time', 'utc'=>'UTC-09:30'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function uploadImage($file, $field){ | |
if (Input::hasFile($field)) { | |
$oldimage = $file->$field; // Fetch old image | |
File::delete(public_path()'/uploads/' . $oldimage); // The destination were you store the image. | |
} | |
$destinationPath = public_path().'/uploads/'; // The destination were you store the image. | |
$filename = $file->getClientOriginalName(); // Original file name | |
$upload_success = $file->move($destinationPath, $filename); // Now we move the file to its new home. | |
$storing_path = 'uploads/'.$filename; // store file name into the database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach($menu as $key => $item){ | |
if ($item[1]){ | |
echo '<li class="selected"><a href="'.$item[0].'">'.$key.'</a></li>'; | |
} | |
else{ | |
echo '<li><a href="'.$item[0].'">'.$key.'</a></li>'; | |
} | |
} | |
http://codepen.io/curtisblackwell/pen/lHysE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://codepen.io/st3ve/pen/IumKz | |
http://codepen.io/nickston/pen/gpsFK | |
http://codepen.io/bronsrobin/pen/yqzfB | |
http://codepen.io/mlms13/pen/vJcix | |
http://codepen.io/ubermensh/pen/bJEmv | |
http://codepen.io/ingermarien/pen/lGFwK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
you can install phpunit globally: | |
composer global require phpunit/phpunit:3.7.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = 'localhost'; // MYSQL database host adress | |
$db = ''; // MYSQL database name | |
$user = ''; // Mysql Datbase user | |
$pass = ''; // Mysql Datbase password | |
// Connect to the database | |
$link = mysql_connect($host, $user, $pass); | |
mysql_select_db($db); |
OlderNewer