Skip to content

Instantly share code, notes, and snippets.

@Kindari
Created January 19, 2014 17:12
Show Gist options
  • Save Kindari/8507774 to your computer and use it in GitHub Desktop.
Save Kindari/8507774 to your computer and use it in GitHub Desktop.
<?php
class FormModel
{
public function validate()
{
...
}
}
<?php
class User extends BaseEloquentModel
{
protected $rules = [
'username' => 'required',
'password' => 'required',
];
}
<?php
class UserRegistrationForm extends FormModel
{
protected $rules = [
'username' => 'required',
'password' => '...',
'password_confirmation' => '...',
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment