Yetesfa AlemayehuFollowJan 2, 2021·1 min readSet logged in user with ObserversUse make: observer and fill in creating() method to automatically set up user_id field for currently logged in user.class PostObserver{ public function creating(Post $post){$post->user_id = auth()->id();}}