fideloper / Implementing-Laravel

Companion application to the e-book Implementing Laravel
171 stars 40 forks source link

Issue with Validation as a Service. #13

Closed bgallagh3r closed 11 years ago

bgallagh3r commented 11 years ago

On Page 63/64 of the Validation as a Service chapter you show the controller's store method like:

// POST /article
public function store()
{
    if( $this->validator->with( Input::all() )->passes() )
    {
        // FORM PROCESSING
    } else {
    return View::make('admin.article_create')
        ->withInput( Input::all() )
        ->withErrors($validator->errors());
}

it should be ->withErrors($this->validator->errors());

bgallagh3r commented 11 years ago

Also occurs on page 66 as well when you reference that method again for the Form Processing part of the chapter.

fideloper commented 11 years ago

Thanks, I'll get that in soon!

bgallagh3r commented 11 years ago

Keep up the good work man. Love the book.

fideloper commented 11 years ago

Updated for next release!