added getPosts method post factory + routes + getModel in base controller laravel