12345678910111213141516171819 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Facades\DB;
- class Category extends Model
- {
- protected $table = 'category';
- public $timestamps = false;
- public static function selectCategoryList($type = 0, $status = 1)
- {
- $categoryData = DB::table('category')->select('id', 'name')->where('type', $type)->where('status', $status)->get()->toArray();
- return $categoryData;
- }
- }
|