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:
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user