Revert "Bookstack grid view."

This commit is contained in:
Abijeet
2017-07-07 17:28:34 +05:30
committed by GitHub
parent a663fc8aa8
commit 3fd61a3600
27 changed files with 29 additions and 179 deletions

View File

@ -3,7 +3,7 @@
class Book extends Entity
{
protected $fillable = ['name', 'description', 'image'];
protected $fillable = ['name', 'description'];
/**
* Get the url for this book.
@ -18,24 +18,6 @@ class Book extends Entity
return baseUrl('/books/' . urlencode($this->slug));
}
public function getBookCover($size = 120)
{
$default = baseUrl('/default.png');
$image = $this->image;
if ($image === 0 || $image === '0' || $image === null)
return $default;
try {
$cover = $this->cover ? baseUrl($this->cover->getThumb(120, 192, false)) : $default;
} catch (\Exception $err) {
$cover = $default;
}
return $cover;
}
public function cover()
{
return $this->belongsTo(Image::class, 'image');
}
/*
* Get the edit url for this book.
* @return string