Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Jan 15, 2024
2 parents 4c148f2 + 065bb45 commit 1cf8bab
Show file tree
Hide file tree
Showing 20 changed files with 428 additions and 418 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: ${{ github.head_ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: composer install --no-interaction
- name: Run Pint
Expand Down
2 changes: 0 additions & 2 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

namespace App\Filament\Pages;

use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Form;
use Filament\Forms\Get;
use Filament\Pages\Dashboard as BaseDashboard;
use Filament\Pages\Page;

class Dashboard extends BaseDashboard
{
Expand Down
3 changes: 0 additions & 3 deletions app/Filament/Resources/Blog/LinkResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Resources\Blog;

use App\Filament\Resources\Blog\LinkResource\Pages;
use App\Filament\Resources\Blog\LinkResource\RelationManagers;
use App\Models\Blog\Link;
use Filament\Forms;
use Filament\Forms\Form;
Expand All @@ -17,8 +16,6 @@
use Filament\Support\Enums\FontWeight;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class LinkResource extends Resource
{
Expand Down
3 changes: 2 additions & 1 deletion app/Filament/Resources/Blog/PostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Resources\Blog;

use App\Filament\Resources\Blog\PostResource\Pages;
use App\Filament\Resources\Blog\PostResource\RelationManagers;
use App\Models\Blog\Post;
use Filament\Forms;
use Filament\Forms\Components\SpatieTagsInput;
Expand Down Expand Up @@ -35,6 +34,8 @@ class PostResource extends Resource

protected static ?int $navigationSort = 0;

protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;

public static function form(Form $form): Form
{
return $form
Expand Down
6 changes: 6 additions & 0 deletions app/Filament/Resources/Blog/PostResource/Pages/EditPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
use App\Filament\Resources\Blog\PostResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
use Illuminate\Contracts\Support\Htmlable;

class EditPost extends EditRecord
{
protected static string $resource = PostResource::class;

public function getTitle(): string | Htmlable
{
return $this->record->title;
}

protected function getActions(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Resources\Blog\PostResource\Pages;

use App\Filament\Resources\Blog\PostResource;
use Filament\Actions;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Infolists\Components\IconEntry;
Expand All @@ -13,8 +12,6 @@
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ManagePostComments extends ManageRelatedRecords
{
Expand All @@ -29,6 +26,11 @@ public function getTitle(): string | Htmlable
return "Manage {$this->getRecordTitle()} Comments";
}

public function getBreadcrumb(): string
{
return 'Comments';
}

public static function getNavigationLabel(): string
{
return 'Manage Comments';
Expand Down
7 changes: 6 additions & 1 deletion app/Filament/Resources/Blog/PostResource/Pages/ViewPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
namespace App\Filament\Resources\Blog\PostResource\Pages;

use App\Filament\Resources\Blog\PostResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
use Illuminate\Contracts\Support\Htmlable;

class ViewPost extends ViewRecord
{
protected static string $resource = PostResource::class;

public function getTitle(): string | Htmlable
{
return $this->record->title;
}

protected function getActions(): array
{
return [];
Expand Down
1 change: 0 additions & 1 deletion app/Filament/Resources/Shop/OrderResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Filament\Resources\Shop\OrderResource\RelationManagers;
use App\Filament\Resources\Shop\OrderResource\Widgets\OrderStats;
use App\Forms\Components\AddressForm;
use App\Models\Blog\Category;
use App\Models\Shop\Order;
use App\Models\Shop\Product;
use Filament\Forms;
Expand Down
1 change: 0 additions & 1 deletion app/Filament/Resources/Shop/ProductResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
use Filament\Forms\Form;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\Page;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Filters\QueryBuilder;
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function getFormSchema(): array
->schema([
Forms\Components\TextInput::make('two'),
]),
])
]),
];
}

Expand Down
3 changes: 2 additions & 1 deletion app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Pages;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\SpatieLaravelTranslatablePlugin;
Expand Down Expand Up @@ -38,6 +37,8 @@ public function panel(Panel $panel): Panel
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->brandLogo(fn () => view('filament.app.logo'))
->brandLogoHeight('1.25rem')
->navigationGroups([
'Shop',
'Blog',
Expand Down
Loading

0 comments on commit 1cf8bab

Please sign in to comment.