A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
A list of amazingly awesome PHP libraries, resources and shiny things.
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<div class="wrap"> | |
<input type="checkbox" class="slider-v1" id="s1" /> | |
<label for="s1"></label> | |
<input type="checkbox" class="slider-v1" id="s2" checked="" /> | |
<label for="s2"></label> | |
</div><!--/wrap--> | |
<div class="wrap"> |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| API Token Filter | |
|-------------------------------------------------------------------------- | |
| | |
| Check for a valid access token or throw an Exception. | |
| | |
| |
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
/* | |
* Read more here: | |
* http://front-back.com/a-cool-css-spinner-with-less-variables | |
*/ | |
/* | |
* This is a nice full CSS3 loader made with LESS | |
* so you'll have to compile it into CSS to make it work in your project | |
* See the doc on the LESS website : http://lesscss.org/ | |
*/ |
//app/routes.php | |
Route::post('favorites', ['as' => 'favorites.store', function() | |
{ | |
if (Request::ajax()) { | |
$postId = Input::get('post-id'); | |
$favorites = DB::table('favorites')->whereUserId(Auth::user()->id)->lists('post_id'); |
I was asked how I deal with validation / create and update validation rulesets. Well here is one method I have used. Don't be afraid to build on top of what the framework has already given you. In my projects I use a base class for almost anything. You never know when you want your classes to inherit some common functionality. My BaseValidator
actually has some pretty useful methods and properties in it.
<?php
namespace FooProject\Internal\Validators;
use FooProject\Internal\Sanitizers\BaseSanitizer;
ini_set("memory_limit","200M"); | |
if( !empty($_SERVER['HTTP_ORIGIN']) ){ | |
// Enable CORS | |
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); | |
header('Access-Control-Allow-Methods: POST, GET, OPTIONS'); | |
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Range, Content-Disposition, Content-Type'); | |
} | |
if( $_SERVER['REQUEST_METHOD'] == 'OPTIONS' ){ |