I started to use Laravel framework and I have a question about its documentation.
For example, I want to make the field unique.
First, I found very short introduction about migrations here: http://laravel.com/docs/master/migrations
Next, I opened API docs (http://laravel.com/api/master/index.html) and looked for Illuminate\Database\Schema\Blueprint class. Then I used its string method which returns Illuminate\Support\Fluent:
$table->string('name', 64)->unique();
Fluent doesn't have unique method, but the method works.
Why Laravel developers return incorrect types?
And how can I find these methods like unique? Documentation is very scarce, interface is incorrect.
P.S. Laravel 5, but same problem exists in Laravel 4.