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
|
// Menampilkan 4 buku rilis baru berdasarkan tahun terbit terbaru
|
||||||
$bukuTerbaru = \App\Models\Buku::whereNotNull('tahun_terbit')
|
$bukuTerbaru = \App\Models\Buku::whereNotNull('tahun_terbit')
|
||||||
->orderBy('tahun_terbit', 'desc')
|
->orderBy('tahun_terbit', 'desc')
|
||||||
->orderBy('id_buku', 'desc')
|
->orderBy('id', 'desc')
|
||||||
->limit(4)
|
->limit(4)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ class Buku extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $table = 'buku';
|
protected $table = 'bukus';
|
||||||
protected $primaryKey = 'id_buku';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'bibid',
|
'bibid',
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "perpustakaan",
|
"name": "Sarakata-Perpustakaan-Daerah-Jember",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "perpustakaan",
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.2",
|
"@tailwindcss/forms": "^0.5.2",
|
||||||
"@tailwindcss/vite": "^4.0.0",
|
"@tailwindcss/vite": "^4.0.0",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue