|
|
|
@ -49,6 +49,7 @@ class UpdateBookIsbnData extends Command
|
|
|
|
$books = Book::whereNotNull('isbn')
|
|
|
|
$books = Book::whereNotNull('isbn')
|
|
|
|
->where('isbn', '!=', '')
|
|
|
|
->where('isbn', '!=', '')
|
|
|
|
->whereNull('cover_id')
|
|
|
|
->whereNull('cover_id')
|
|
|
|
|
|
|
|
->where('id', 1)
|
|
|
|
->get();
|
|
|
|
->get();
|
|
|
|
|
|
|
|
|
|
|
|
if ($books->isEmpty()) {
|
|
|
|
if ($books->isEmpty()) {
|
|
|
|
@ -165,7 +166,7 @@ class UpdateBookIsbnData extends Command
|
|
|
|
$filename = 'book_cover_' . $book->id . '_' . time() . '.' . $extension;
|
|
|
|
$filename = 'book_cover_' . $book->id . '_' . time() . '.' . $extension;
|
|
|
|
|
|
|
|
|
|
|
|
// 定义存储目录
|
|
|
|
// 定义存储目录
|
|
|
|
$folder = 'uploads/book_covers/' . date('Y/m');
|
|
|
|
$folder = 'uploads/book_covers';
|
|
|
|
|
|
|
|
|
|
|
|
// 确保目录存在
|
|
|
|
// 确保目录存在
|
|
|
|
$fullPath = public_path($folder);
|
|
|
|
$fullPath = public_path($folder);
|
|
|
|
|