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.
| # Encoding: UTF-8 | |
| require "rubygems" | |
| require 'httpclient' | |
| URL = "http://m.habrahabr.ru/post/138291/" | |
| habra = HTTPClient.new | |
| text = habra.get(URL).http_body.content | |
| begin |
| <?php | |
| /** | |
| * AuthController | |
| * | |
| * Handles | |
| * - Login | |
| * - Logout | |
| * - Logout | |
| */ | |
| class AuthController extends BaseController |
A list of amazingly awesome PHP libraries, resources and shiny things.
| <?php defined('SYSPATH') or die('No direct script access.'); | |
| /** | |
| * MySQL "Closure Table" for Kohana based on Bill Karwin design. | |
| * | |
| * @link http://www.slideshare.net/billkarwin/models-for-hierarchical-data | |
| * @TODO improve | |
| * | |
| * sql schema: | |
| * CREATE TABLE `closures` ( | |
| * `id` int(11) NOT NULL AUTO_INCREMENT, |
| <?php | |
| namespace Geleyi\Helpers; | |
| use Illuminate\Support\Facades\DB; | |
| /** | |
| * Class Hierarchy | |
| * |
| <?php | |
| /** | |
| * Class for Laravel 3.x that provides ability to use nested transactions via SAVEPOINTs | |
| * (inspired from http://www.kennynet.co.uk/2008/12/02/php-pdo-nested-transactions/). | |
| * For now, only the default connection is supported. | |
| * | |
| * Useful in testing, when you want to start a transaction before running a test | |
| * and revert all its changes after it finished. | |
| * |
| CREATE TABLE `makers` ( | |
| `id` int(10) unsigned NOT NULL, | |
| `name` varchar(255) NOT NULL, | |
| `description` varchar(255) NOT NULL, | |
| `created_at` datetime NOT NULL, | |
| `updated_at` datetime NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
| -- |
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:
| <html> | |
| <head></head> | |
| <body> | |
| <section id="main" class="mc-login-inner container" style="height: 100%"> | |
| <h2>Original Solution</h2> | |
| <p>Found on <a href="http://jsfiddle.net/EP83X/22/">http://jsfiddle.net/EP83X/22/</a></p> | |
| <form> | |
| <div class="row"> | |
| <div class="offset4 span4"> | |
| <div class="input-prepend"> |
| /* | |
| * Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
| * Better handling of scripts without supplied ids. | |
| * | |
| * N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
| */ | |
| (function(doc, script) { | |
| var js, | |
| fjs = doc.getElementsByTagName(script)[0], |