render searchbox relate icon css

This commit is contained in:
xiaomlove
2021-05-28 02:25:08 +08:00
parent 4cde957edb
commit 685a427c13
6 changed files with 38 additions and 10 deletions

View File

@@ -8,4 +8,9 @@ class Category extends NexusModel
protected $table = 'categories';
protected $fillable = ['mode', 'name', 'class_name', 'image', 'sort_index', 'icon_id'];
public function icon(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Icon::class, 'icon_id');
}
}

11
app/Models/Icon.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
namespace App\Models;
class Icon extends NexusModel
{
protected $table = 'caticons';
protected $fillable = ['name', 'folder', 'cssfile', 'multilang', 'secondicon', 'designer', 'comment'];
}

View File

@@ -22,7 +22,4 @@ class SearchBox extends NexusModel
return $this->hasMany(SearchBoxField::class, 'searchbox_id');
}
}