This file contains hidden or 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 User extends Eloquent { | |
public static $rules = array( | |
'username'=>'required|unique:users|alpha_dash|min:4', | |
'password'=>'required|alpha_num|between:4,8|confirmed', | |
'password_confirmation'=>'required|alpha_num|between:4,8' | |
); | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>{{ $title }}</title> | |
{{ HTML::style('/css/main.css') }} | |
</head> | |
<body> | |
<div id="container"> |
This file contains hidden or 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 Create_Users_Table { | |
/** | |
* Make changes to the database. | |
* | |
* @return void | |
*/ | |
public function up() |
This file contains hidden or 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 Questions_Controller extends Base_Controller { | |
public $restful = true; | |
public function get_index() { | |
return View::make('questions.index') | |
->with('title', 'Make It Snappy Q&A - Home') | |
->with('questions', Question::unsolved()); |
This file contains hidden or 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
@layout('layouts.default') | |
@section('content') | |
Home Page | |
@endsection |
This file contains hidden or 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 Users_Controller extends Base_Controller { | |
public $restful = true; | |
public function get_new() { | |
return View::make('users.new') | |
->with('title', 'Make It Snappy Q&A - Register'); | |
} |
This file contains hidden or 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
@layout('layouts.default') | |
@section('content') | |
<h1>Register</h1> | |
@if($errors->has()) | |
<p>The following errors have occurred:</p> | |
<ul id="form-errors"> | |
{{ $errors->first('username', '<li>:message</li>') }} |
This file contains hidden or 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 Basemodel extends Eloquent { | |
public static function validate($data) { | |
return Validator::make($data, static::$rules); | |
} | |
} |
This file contains hidden or 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 Users_Controller extends Base_Controller { | |
public $restful = true; | |
public function get_new() { | |
return View::make('users.new') | |
->with('title', 'Make It Snappy Q&A - Register'); | |
} |
This file contains hidden or 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 Users_Controller extends Base_Controller { | |
public $restful = true; | |
public function get_new() { | |
return View::make('users.new') | |
->with('title', 'Make It Snappy Q&A - Register'); | |
} |
OlderNewer