0re1's avatar
Level 1

Artisan created model missing properties

Hi,

I am new to Laravel. I installed Laravel 5 and then created object model with artisan:

php artisan make:model User

I had table users (created via migration in sqlite) with ID and timestamp installed before (added some fields to suite my needs). Yet when I try to create object instance in artisan tinker:

$user = new App\User;

I got an empty object without timestamp or ID however these are visible in tutorial https://laracasts.com/series/laravel-5-fundamentals/episodes/8

What am I doing wrong?

0 likes
1 reply
bastiaan89's avatar
Level 11

The timestamps and ID are set after saving the model.

1 like

Please or to participate in this conversation.