public function testStoreSuccessWithRedirectToList() { $object = new Tag(); $object->id = 1; Tag::shouldReceive('create')->once()->andReturn($object); $input = ['tag' => 'test', 'slug' => 'test', 'exit' => true]; $this->call('POST', 'admin/tags', $input); $this->assertRedirectedToRoute('admin.tags.index'); }
/** * Show the form for editing the specified resource. * * @param Model $model * @return Response */ public function edit(Model $model) { JavaScript::put(['tags' => Tag::lists('tag')]); $tags = implode(', ', $model->tags->lists('tag')); $this->layout->content = View::make('admin.edit')->withTags($tags)->withModel($model); }