Skip to content

Commit 824788a

Browse files
committed
Use a new namespace
1 parent 4f94c0a commit 824788a

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
⚠️ This package is under active development
44

5-
[![Latest Stable Version](https://poser.pugx.org/idf/nova-unlayer-field/v/stable)](https://packagist.org/packages/idf/nova-unlayer-field)
6-
[![Total Downloads](https://poser.pugx.org/idf/nova-unlayer-field/downloads)](https://packagist.org/packages/idf/nova-unlayer-field)
5+
[![Latest Stable Version](https://poser.pugx.org/interaction-design-foundation/nova-unlayer-field/v/stable)](https://packagist.org/packages/idf/nova-unlayer-field)
6+
[![Total Downloads](https://poser.pugx.org/interaction-design-foundation/nova-unlayer-field/downloads)](https://packagist.org/packages/idf/nova-unlayer-field)
77

88
Adds a Laravel Nova field for Unlayer to compose emails and landing pages.
99

@@ -14,7 +14,7 @@ Adds a Laravel Nova field for Unlayer to compose emails and landing pages.
1414
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
1515

1616
```bash
17-
composer require idf/nova-unlayer-field
17+
composer require interaction-design-foundation/nova-unlayer-field
1818
```
1919

2020
## Usage

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"name": "idf/nova-unlayer-field",
2+
"name": "interaction-design-foundation/nova-unlayer-field",
33
"description": "A Laravel Nova field for Unlayer to compose emails and landing pages",
44
"keywords": [
55
"laravel",
66
"nova"
77
],
88
"license": "MIT",
99
"require": {
10-
"php": ">=7.1.0"
10+
"php": "^8.0"
1111
},
1212
"autoload": {
1313
"psr-4": {
14-
"IDF\\NovaUnlayerField\\": "src/"
14+
"InteractionDesignFoundation\\NovaUnlayerField\\": "src/"
1515
}
1616
},
1717
"extra": {
1818
"laravel": {
1919
"providers": [
20-
"IDF\\NovaUnlayerField\\ServiceProvider"
20+
"InteractionDesignFoundation\\NovaUnlayerField\\ServiceProvider"
2121
]
2222
}
2323
},

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace IDF\NovaUnlayerField;
3+
namespace InteractionDesignFoundation\NovaUnlayerField;
44

55
use Illuminate\Support\ServiceProvider as BasicServiceProvider;
66
use Laravel\Nova\Nova;

src/Unlayer.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php declare(strict_types=1);
22

3-
namespace IDF\NovaUnlayerField;
3+
namespace InteractionDesignFoundation\NovaUnlayerField;
44

5-
use Illuminate\Database\Eloquent\Model;
65
use Laravel\Nova\Fields\Code;
76
use Laravel\Nova\Http\Requests\NovaRequest;
87

@@ -27,9 +26,8 @@ class Unlayer extends Code
2726
* Specify Unlayer config
2827
* @see https://docs.unlayer.com/docs/getting-started#section-configuration-options
2928
* @param array|callable():array $config
30-
* @return \IDF\NovaUnlayerField\Unlayer
3129
*/
32-
public function config($config): Unlayer
30+
final public function config(array | callable $config): static
3331
{
3432
$customUnlayerConfig = is_callable($config)
3533
? $config()
@@ -44,9 +42,8 @@ public function config($config): Unlayer
4442

4543
/**
4644
* @param null|callable(\Laravel\Nova\Http\Requests\NovaRequest, string, \Illuminate\Database\Eloquent\Model, string):void $callback
47-
* @return $this
4845
*/
49-
public function savingCallback(?callable $callback): Unlayer
46+
final public function savingCallback(?callable $callback): static
5047
{
5148
$this->savingCallback = $callback;
5249

@@ -56,9 +53,8 @@ public function savingCallback(?callable $callback): Unlayer
5653
/**
5754
* Set generated HTML code that can be used on details page.
5855
* @param string|callable():string $html
59-
* @return \IDF\NovaUnlayerField\Unlayer
6056
*/
61-
public function html($html): Unlayer
57+
final public function html(array | callable $html): static
6258
{
6359
$html = is_callable($html)
6460
? $html()
@@ -68,20 +64,20 @@ public function html($html): Unlayer
6864
}
6965

7066
/**
71-
* Specify javascript modules to process unlayer's design on every design change.
67+
* Specify javascript modules to process Unlayer’s design on every design change.
7268
* @param string[] $plugins
73-
* @return \IDF\NovaUnlayerField\Unlayer
7469
*/
75-
public function plugins(array $plugins): Unlayer
70+
final public function plugins(array $plugins): static
7671
{
7772
return $this->withMeta(['plugins' => $plugins]);
7873
}
7974

8075
/**
8176
* Hydrate the given attribute on the model based on the incoming request.
77+
* @see \Laravel\Nova\Fields\Field::fillAttributeFromRequest
8278
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
8379
* @param string $requestAttribute
84-
* @param Model $model
80+
* @param \Illuminate\Database\Eloquent\Model $model
8581
* @param string $attribute
8682
* @return void
8783
*/

0 commit comments

Comments
 (0)