Skip to content

Commit 4cff15e

Browse files
committed
Merge branch 'master' into collection-importer
2 parents 00d6516 + 0a91f96 commit 4cff15e

File tree

5 files changed

+13
-44
lines changed

5 files changed

+13
-44
lines changed

docs/control-panel.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@ Technically, you can’t fully disable Runway’s CP feature. However, what you
2323
],
2424
```
2525

26-
## Custom Icon for CP Nav Item
27-
28-
Runway has a rather generic icon for resources in the Control Panel Nav. Feel free to change this to something else that better suits your use case (in fact, I’d encourage it).
29-
30-
You can either provide the name of an existing icon [packaged into Statamic Core](https://github.com/statamic/cms/tree/3.1/resources/svg) or inline the SVG as a string.
31-
32-
```php
33-
// config/runway.php
34-
35-
'resources' => [
36-
\App\Models\Order::class => [
37-
'name' => 'Orders',
38-
'cp_icon' => 'date',
39-
],
40-
],
41-
```
42-
4326
## Permissions
4427

4528
![Screenshot of Runway's User Permissions](/img/runway/cp-user-permissions.png)

docs/resources.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,6 @@ If you’d like to hide the CP Nav Item that’s registered for this model, just
7979

8080
> Bear in mind, this will just hide the Nav Item for the CP interface, it won’t actually get rid of the routes being registered. If someone knows where to look, they could still use the CP to manage your models (they could guess the URL).
8181
82-
### Control Panel Icon
83-
84-
You should set `icon` to the name of the icon you’d like to use instead.
85-
86-
Alternatively, if the icon you want isn’t [included in Statamic](https://github.com/statamic/cms/tree/3.1/resources/svg), you can also pass an inline SVG.
87-
88-
```php
89-
'resources' => [
90-
\App\Models\Order::class => [
91-
'name' => 'Orders',
92-
'cp_icon' => 'date',
93-
],
94-
],
95-
```
96-
9782
### Route
9883

9984
If you want to take advantage of Runway’s front-end routing abilities, you can pass in a `route` to enable it.

docs/upgrade-guides/v7-to-v8.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ To work around this, v8 introduces some changes around how nested fields are con
6666

6767
As an upside of this new approach, nested fields can now be used with Runway's [GraphQL API](/graphql).
6868

69+
### Removal of the `cp_icon` config option
70+
71+
The `cp_icon` configuration option has been removed in Runway 8, in favour of being able to change the icon using Statamic's [Nav Preferences](https://statamic.dev/preferences#accessing-preferences) feature.
72+
73+
```php
74+
'resources' => [
75+
\App\Models\Order::class => [
76+
'name' => 'Orders',
77+
'cp_icon' => 'date', // [tl! --]
78+
],
79+
],
80+
```
81+
6982
## Previous upgrade guides
7083

7184
- [v3.x to v4.0](/upgrade-guides/v3-x-to-v4-0)

src/Resource.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Database\Eloquent\Model;
66
use Illuminate\Support\Collection;
7-
use Illuminate\Support\Facades\File;
87
use Illuminate\Support\Facades\Schema;
98
use Illuminate\Support\Str;
109
use Statamic\Facades\Blink;
@@ -66,15 +65,6 @@ public function config(): Collection
6665
return $this->config;
6766
}
6867

69-
public function cpIcon(): string
70-
{
71-
if (! $this->config->has('cp_icon')) {
72-
return File::get(__DIR__.'/../resources/svg/database.svg');
73-
}
74-
75-
return $this->config->get('cp_icon');
76-
}
77-
7868
public function hidden(): bool
7969
{
8070
return $this->config->get('hidden', false);
@@ -290,7 +280,6 @@ public function toArray(): array
290280
'model' => $this->model(),
291281
'name' => $this->name(),
292282
'blueprint' => $this->blueprint(),
293-
'cp_icon' => $this->cpIcon(),
294283
'hidden' => $this->hidden(),
295284
'route' => $this->route(),
296285
'has_publish_states' => $this->hasPublishStates(),

src/ServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ protected function registerNavigation(): self
146146
->each(function (Resource $resource) use (&$nav) {
147147
$nav->create($resource->name())
148148
->section('Content')
149-
->icon($resource->cpIcon())
150149
->route('runway.index', ['resource' => $resource->handle()])
151150
->can('view', $resource);
152151
});

0 commit comments

Comments
 (0)