liyinglin 2 years ago
parent f7bd773ed1
commit 92ffb08e33

@ -399,11 +399,12 @@ class StatisticsController extends CommonController
}
})->where('admin_id', $user->id)->pluck('area_id');
}
$data = Area::where(function ($query) use ($areaId) {
$data = Area::with('project', 'building')->where(function ($query) use ($areaId) {
if ($areaId) {
$query->whereIn('id', $areaId);
}
})->get();
})->paginate(10);
dd($data->toArray());
return view($this->bladePath . ".huli", compact("data"));
}

@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Auth;
class Product extends SoftDeletesModel
{
protected $table = "product";
protected static function booted()
{
static::addGlobalScope(new AdminProjectScope());

Loading…
Cancel
Save