Skip to content
  • This project
    • Loading...
  • Sign in

PaoPao / serviceWork

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • serviceWork
  • app
  • ModelFilters
  • CountryRegionFilter.php
  • 杨俊's avatar
    feat(master): 初始化 · a4671c53
    a4671c53
    杨俊 authored 2024-05-27 10:32:33 +0800
CountryRegionFilter.php 450 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?php

namespace App\ModelFilters;

use App\Support\ModelFilter;

class CountryRegionFilter extends ModelFilter
{
    /**
     * @param int $parent
     * @return void
     */
    public function parent(int $parent): void
    {
        $this->where('parent_id', $parent);
    }

    /**
     * @param int $country
     * @return void
     */
    public function country(int $country): void
    {
        $this->where('country_id', $country);
    }
}