Skip to content

Commit

Permalink
Small bug fixes in Admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
GeniJaho committed Jan 2, 2024
1 parent e6a3580 commit 71625d8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 41 deletions.
4 changes: 3 additions & 1 deletion app/Filament/Resources/PhotoResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ class PhotoResource extends Resource
{
protected static ?string $model = Photo::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'heroicon-o-photo';

public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('user.name')
->numeric()
->searchable()
->sortable(),
ImageColumn::make('path')
->label('Photo')
->searchable(),
TextColumn::make('created_at')
->dateTime()
Expand Down
11 changes: 0 additions & 11 deletions app/Filament/Resources/PhotoResource/Pages/CreatePhoto.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Filament/Resources/PhotoResource/Pages/EditPhoto.php

This file was deleted.

8 changes: 0 additions & 8 deletions app/Filament/Resources/PhotoResource/Pages/ListPhotos.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@
namespace App\Filament\Resources\PhotoResource\Pages;

use App\Filament\Resources\PhotoResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;

class ListPhotos extends ListRecords
{
protected static string $resource = PhotoResource::class;

protected function getHeaderActions(): array
{
return [
CreateAction::make(),
];
}
}
3 changes: 2 additions & 1 deletion app/Filament/Resources/TagResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TagResource extends Resource
{
protected static ?string $model = Tag::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'heroicon-o-tag';

public static function form(Form $form): Form
{
Expand All @@ -34,6 +34,7 @@ public static function form(Form $form): Form
->maxLength(191),
TextInput::make('slug')
->required()
->unique(ignoreRecord: true)
->maxLength(191),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class UserResource extends Resource
{
protected static ?string $model = User::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'heroicon-o-users';

public static function form(Form $form): Form
{
Expand Down

0 comments on commit 71625d8

Please sign in to comment.