Applied required changes

This commit is contained in:
Nilesh Deepak 2017-07-05 12:26:02 +05:30
commit d99fd1fd65
5 changed files with 30 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class BookController extends Controller
$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] );
}
/**

View File

@ -22,7 +22,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
* 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.

View File

@ -17,8 +17,8 @@ class CreateUsersTable extends Migration
$table->string('name');
$table->string('email')->unique();
$table->string('password', 60);
$table->rememberToken();
$table->string('books_display')->default('grid');
$table->rememberToken();
$table->nullableTimestamps();
});

View File

@ -23,8 +23,8 @@ class CreateBooksTable extends Migration
$table->string('name');
$table->string('slug')->indexed();
$table->text('description');
$table->nullableTimestamps();
$table->string('image');
$table->nullableTimestamps();
});
}

View File

@ -276,6 +276,32 @@ $btt-size: 40px;
.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;