postRepository = $postRepository; } /** * Execute the console command. * * @return mixed */ public function handle() { $post = $this->postRepository->create([ 'name' => $this->argument('name'), 'email' => $this->argument('email'), 'password' => $this->argument('password') ]); $this->info(sprintf('A post was created with ID %s', $post->id)); } }