Here's how I setup Laravel on MAMP:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
<?php | |
class Model_Student_Profile extends ORM { | |
/** | |
* Model validation rules | |
*/ | |
public function rules() | |
{ | |
return array( |
<?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 example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
<snippet> | |
<content><![CDATA[ | |
// ${1} Resource | |
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index')); | |
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show')); | |
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new')); | |
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit')); | |
Route::post('${1}s', '${1}s@create'); | |
Route::put('${1}s/(:any)', '${1}s@update'); | |
Route::delete('${1}s/(:any)', '${1}s@destroy'); |
A list of amazingly awesome PHP libraries that you should be using:
public static function read_search($terms, $limit = 10) | |
{ | |
$contact_results = DB::query(" | |
select * | |
from contacts | |
where `account_user_id`=? | |
and `deleted`='0' | |
and `marketing`='0' | |
and `mass_merge`='0' | |
and match (`first`, `last`) against (?) |
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: