Laravel 5 Authentication

1. Installation

Laravel comes with authentication out of the box. You just have to configure it. Open up your terminal and run this command like so:

php artisan make:auth

2. Tricks

Validation for updates: ignore others fields that are not the primary key:

public function rules()
      return [
          'club_id' => 'required|integer',
          'code' => 'required|integer|unique:services,code,' . $this->code . ',code',
          'description' => 'required',
          'description' => 'required',
          'form_token' => 'required',