1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Tweaked some styles and started automated testing. Fixes #11.

This commit is contained in:
Dan Brown
2015-09-02 18:26:33 +01:00
parent 30d2edddda
commit 713827f941
23 changed files with 254 additions and 55 deletions

View File

@ -70,7 +70,7 @@ class BookController extends Controller
$book->updated_by = Auth::user()->id;
$book->save();
Activity::add($book, 'book_create', $book->id);
return redirect('/books');
return redirect($book->getUrl());
}
/**

View File

@ -65,7 +65,7 @@ class ChapterController extends Controller
$chapter->updated_by = Auth::user()->id;
$book->chapters()->save($chapter);
Activity::add($chapter, 'chapter_create', $book->id);
return redirect($book->getUrl());
return redirect($chapter->getUrl());
}
/**

View File

@ -35,6 +35,11 @@ class BookRepo
return $this->book->where('slug', '=', $slug)->first();
}
/**
* Get a new book instance from request input.
* @param $input
* @return Book
*/
public function newFromInput($input)
{
return $this->book->fill($input);