Laravel - Custom User Fields
I want to add custom user fields, but not have them be assigned at registration or "required". Would the most effective way to do this be adding a field to the Auth object, or would there be a better way to do this?
In a fresh Laravel 5 installation you have to edit the User class and the users migration:
1) In your
app/User.php you have to extend the
$fillable array for each custom field.
$fillable = ['name', 'email', 'password', 'city']; for a custom
2) In your
database/migrations/2014_10_12_000000_create_users_table.php you have to add a database column for each custom field and run afterwards
php artisan migrate (see http://laravel.com/docs/master/migrations).
$table->string('city'); for a custom
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms