12345678910111213141516171819 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Facades\DB;
- class Tag extends Model
- {
- protected $table = 'tag';
- public $timestamps = false;
- public static function selectTagList($categoryId, $status = 1)
- {
- $tagData = DB::table('tag')->select('id', 'name')->where('category_id', $categoryId)->where('status', $status)->get()->toArray();
- return $tagData;
- }
- }
|