Skip to content

Tag: laravel

Difference between EloquentModel::get() and all()

What is the difference between uses User::all() and User::get() on Eloquent? On Laravel API it describes only all() on EloquentModel.Maybe get() is described on EloquentBuilder. Answer User::all() and User::get() will do the exact same thing. all() is a static method on the EloquentModel. All it does is creat…

Change Faker Locale in Laravel 5.2

Is there a way to specify the Faker locale in the database/factories/ModelFactory.php file ? Here is my non functioning attempt at doing so >,< Thanks for reading! Answer Faker locale can be configured in the config/app.php configuration file. Just add the key faker_locale. e.g.: ‘faker_locale&#82…