Skip to content

Commit

Permalink
Remove ucwords
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoungportable committed Mar 7, 2024
1 parent f94f1c7 commit bab3b5d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/Filament/Resources/AbstractConfigurableResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

namespace Portable\FilaCms\Filament\Resources;

use Filament\Resources\Resource as ResourcesResource;
use Portable\FilaCms\Filament\Traits\UserConfigurableResource;

abstract class AbstractConfigurableResource extends ResourcesResource
abstract class AbstractConfigurableResource extends AbstractResource
{
use UserConfigurableResource;
}
3 changes: 1 addition & 2 deletions src/Filament/Resources/AbstractContentResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
Expand All @@ -21,7 +20,7 @@
use Portable\FilaCms\Models\Page;
use Portable\FilaCms\Models\Scopes\PublishedScope;

class AbstractContentResource extends Resource
class AbstractContentResource extends AbstractResource
{
use IsProtectedResource;

Expand Down
18 changes: 18 additions & 0 deletions src/Filament/Resources/AbstractResource.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Portable\FilaCms\Filament\Resources;

use Filament\Resources\Resource;
use Illuminate\Support\Str;

class AbstractResource extends Resource
{
public static function getTitleCaseModelLabel(): string
{
if (! static::hasTitleCaseModelLabel()) {
return static::getModelLabel();
}

return Str::title(static::getModelLabel());
}
}
3 changes: 1 addition & 2 deletions src/Filament/Resources/AuthorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Filament\Forms\Components\Toggle;
use Filament\Forms\Form;
use Filament\Forms\Get;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
Expand All @@ -16,7 +15,7 @@
use Portable\FilaCms\Filament\Traits\IsProtectedResource;
use Portable\FilaCms\Models\Author;

class AuthorResource extends Resource
class AuthorResource extends AbstractResource
{
use IsProtectedResource;

Expand Down
3 changes: 1 addition & 2 deletions src/Filament/Resources/PermissionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
use Portable\FilaCms\Filament\Resources\PermissionResource\Pages;
use Portable\FilaCms\Filament\Traits\IsProtectedResource;
use Spatie\Permission\Models\Permission;

class PermissionResource extends Resource
class PermissionResource extends AbstractResource
{
use IsProtectedResource;

Expand Down
3 changes: 1 addition & 2 deletions src/Filament/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
use Portable\FilaCms\Filament\Resources\RoleResource\Pages;
use Portable\FilaCms\Filament\Traits\IsProtectedResource;
use Spatie\Permission\Models\Role;

class RoleResource extends Resource
class RoleResource extends AbstractResource
{
use IsProtectedResource;

Expand Down
3 changes: 1 addition & 2 deletions src/Filament/Resources/TaxonomyResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Portable\FilaCms\Filament\Resources\TaxonomyResource\Pages;
use Portable\FilaCms\Filament\Resources\TaxonomyResource\RelationManagers;
use Portable\FilaCms\Filament\Traits\IsProtectedResource;
use Portable\FilaCms\Models\Taxonomy;

class TaxonomyResource extends Resource
class TaxonomyResource extends AbstractResource
{
use IsProtectedResource;

Expand Down

0 comments on commit bab3b5d

Please sign in to comment.