/** * Store a newly created resource in storage. * * @return Response */ public function store(Request $request) { $input = $request->all(); if ($this->portfolioRepository->create($input)) { return 'sucesso'; } }
/** * @test */ public function it_can_persist_a_record() { $title = 'a post'; $body = 'some witty blog post'; $created = $this->posts->create(['title' => $title, 'body' => $body]); $post = Post::find($created->id); $this->assertEquals($post->title, $title); $this->assertEquals($post->body, $body); }