• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

conedevelopment / bazar / 20694116184

04 Jan 2026 02:08PM UTC coverage: 68.615% (+4.5%) from 64.117%
20694116184

push

github

iamgergo
version

1679 of 2447 relevant lines covered (68.61%)

25.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Fields/Address.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Cone\Bazar\Fields;
6

7
use Closure;
8
use Cone\Bazar\Support\Countries;
9
use Cone\Root\Fields\Email;
10
use Cone\Root\Fields\MorphOne;
11
use Cone\Root\Fields\Select;
12
use Cone\Root\Fields\Text;
13
use Illuminate\Http\Request;
14

15
class Address extends MorphOne
16
{
17
    /**
18
     * Create a new relation field instance.
19
     */
20
    public function __construct(?string $label = null, Closure|string|null $modelAttribute = null, Closure|string|null $relation = null)
×
21
    {
22
        parent::__construct($label ?: __('Address'), $modelAttribute ?: 'address', $relation);
×
23

24
        $this->display('alias');
×
25
        $this->asSubResource();
×
26
    }
27

28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function fields(Request $request): array
×
32
    {
33
        return [
×
34
            Text::make(__('First Name'), 'first_name'),
×
35

36
            Text::make(__('Last Name'), 'last_name'),
×
37

38
            Text::make(__('Company'), 'company'),
×
39

40
            Text::make(__('Tax ID'), 'tax_id'),
×
41

42
            Email::make(__('Email'), 'email'),
×
43

44
            Text::make(__('Phone'), 'phone'),
×
45

46
            Select::make(__('Country'), 'country')
×
47
                ->options(Countries::all()),
×
48

49
            Text::make(__('City'), 'city'),
×
50

51
            Text::make(__('Postcode'), 'postcode'),
×
52

53
            Text::make(__('State'), 'state'),
×
54

55
            Text::make(__('Address'), 'address'),
×
56

57
            Text::make(__('Address Secondary'), 'address_secondary'),
×
58
        ];
×
59
    }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc