Skip to content

Instantly share code, notes, and snippets.

View gist:8537274

My Validation Base Class

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.


namespace FooProject\Internal\Validators;

use FooProject\Internal\Sanitizers\BaseSanitizer;
akuzemchak /
Last active Dec 6, 2020
New L4 project with clean history
# Initial setup
git clone -o framework -b develop project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit
niallobrien / gist:5098578
Last active Jan 12, 2016
Laravel 4 install & update process
View gist:5098578
// Clone L4 repo
git clone -b develop git:// myapp
cd myapp
// Install Composer
curl -sS | php
php composer.phar install
// Rename origin
git remote rename origin upstream
ziadoz /
Last active Sep 30, 2022
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.