$popular = $this->entityRepo->getPopular('book', 3, 0);
$books_display = $this->currentUser->books_display;
$this->setPageTitle('Books');
- return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular, 'books_display' => $books_display]);
+ return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular, 'books_display' => $books_display] );
}
/**
* The attributes that are mass assignable.
* @var array
*/
- protected $fillable = ['name', 'email', 'image_id', 'books_display'];
+ protected $fillable = ['name', 'email', 'image_id', 'books_display' ];
/**
* The attributes excluded from the model's JSON form.
$table->string('name');
$table->string('email')->unique();
$table->string('password', 60);
- $table->rememberToken();
$table->string('books_display')->default('grid');
+ $table->rememberToken();
$table->nullableTimestamps();
});
$table->string('name');
$table->string('slug')->indexed();
$table->text('description');
- $table->nullableTimestamps();
$table->string('image');
+ $table->nullableTimestamps();
});
}
+.galleryItem {
+ width: 22%;
+ padding: 5px;
+ float: left;
+ height: 330px;
+ margin: 2% 1% 2% 1%;
+ overflow: hidden;
+ border: 1px solid #9e9e9e;
+ h3 {
+ font-size: 1.2em;
+ text-align: center;
+ }
+ p {
+ font-size: 0.8em;
+ text-align: center;
+ }
+ img {
+ height: 192px;
+ width: 120px;
+ margin-top: 5%;
+ }
+ &.collapse {
+ height: 130px;
+ }
+}
+
.galleryItem {
width: 22%;
padding: 5px;