Fix: resolve database migration and model inconsistencies
This commit is contained in:
parent
56e69bd01d
commit
5f8202e7ca
|
|
@ -11,7 +11,7 @@ public function index()
|
|||
// Menampilkan 4 buku rilis baru berdasarkan tahun terbit terbaru
|
||||
$bukuTerbaru = \App\Models\Buku::whereNotNull('tahun_terbit')
|
||||
->orderBy('tahun_terbit', 'desc')
|
||||
->orderBy('id_buku', 'desc')
|
||||
->orderBy('id', 'desc')
|
||||
->limit(4)
|
||||
->get();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ class Buku extends Model
|
|||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'buku';
|
||||
protected $primaryKey = 'id_buku';
|
||||
protected $table = 'bukus';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $fillable = [
|
||||
'bibid',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
"name": "perpustakaan",
|
||||
"name": "Sarakata-Perpustakaan-Daerah-Jember",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "perpustakaan",
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.2",
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue