Kaan
Kaan
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
Thanks for helping!
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
Yes, sorry my stupidity. 4 days ago I installed spatie's media librrary and they were in conflict 🙂
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
composer require awcodes/filament-curator
php artisan curator:install
npm install -D cropperjs
composer require awcodes/filament-curator
php artisan curator:install
npm install -D cropperjs
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
I'm writing this commands:
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
but nothing to changed
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
I installed again
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
<?php

use Awcodes\Curator\Facades\Curator;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
if(config('curator.is_tenant_aware')) {
Schema::table(app(config('curator.model'))->getTable(), function (Blueprint $table) {
$table->integer(config('curator.tenant_ownership_relationship_name') . '_id')->nullable();
});
}
}

public function down(): void
{
if (Schema::hasColumn(app(config('curator.model'))->getTable(), config('curator.tenant_ownership_relationship_name') . '_id')) {
Schema::table(app(config('curator.model'))->getTable(), function(Blueprint $table) {
$table->dropColumn(config('curator.tenant_ownership_relationship_name') . '_id');
});
}
}
};
<?php

use Awcodes\Curator\Facades\Curator;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
if(config('curator.is_tenant_aware')) {
Schema::table(app(config('curator.model'))->getTable(), function (Blueprint $table) {
$table->integer(config('curator.tenant_ownership_relationship_name') . '_id')->nullable();
});
}
}

public function down(): void
{
if (Schema::hasColumn(app(config('curator.model'))->getTable(), config('curator.tenant_ownership_relationship_name') . '_id')) {
Schema::table(app(config('curator.model'))->getTable(), function(Blueprint $table) {
$table->dropColumn(config('curator.tenant_ownership_relationship_name') . '_id');
});
}
}
};
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::create('media', function (Blueprint $table) {
$table->id();

$table->morphs('model');
$table->uuid()->nullable()->unique();
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('mime_type')->nullable();
$table->string('disk');
$table->string('conversions_disk')->nullable();
$table->unsignedBigInteger('size');
$table->json('manipulations');
$table->json('custom_properties');
$table->json('generated_conversions');
$table->json('responsive_images');
$table->unsignedInteger('order_column')->nullable()->index();

$table->nullableTimestamps();
});
}
};
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::create('media', function (Blueprint $table) {
$table->id();

$table->morphs('model');
$table->uuid()->nullable()->unique();
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('mime_type')->nullable();
$table->string('disk');
$table->string('conversions_disk')->nullable();
$table->unsignedBigInteger('size');
$table->json('manipulations');
$table->json('custom_properties');
$table->json('generated_conversions');
$table->json('responsive_images');
$table->unsignedInteger('order_column')->nullable()->index();

$table->nullableTimestamps();
});
}
};
15 replies
FFilament
Created by Kaan on 4/28/2024 in #❓┊help
Awcodes | Curator Image Upload Error
I just installed
15 replies
FFilament
Created by Kaan on 10/21/2023 in #❓┊help
Catch data from fill
->visible(fn(callable $get) => $get('type') == 'upload')
->visible(fn(callable $get) => $get('type') == 'upload')
Solved this problem with callable method.
3 replies
FFilament
Created by Kaan on 10/16/2023 in #❓┊help
Custom Page Repeater Delete Item
public function form(Form $form): Form
{
return $form
->schema([
Repeater::make('partners')
->label('Pozisyon')
->schema([
TextInput::make('name'),
TextInput::make('website'),
FileUpload::make('logo')
->image()
->directory('partners')
->required(),
])
->reorderable()
->reorderableWithButtons()
->orderColumn('position')
->addable(false)
->deletable(true)
->deleteAction(fn (Action $action) => $action->requiresConfirmation()),
])->statePath('data');
}
public function form(Form $form): Form
{
return $form
->schema([
Repeater::make('partners')
->label('Pozisyon')
->schema([
TextInput::make('name'),
TextInput::make('website'),
FileUpload::make('logo')
->image()
->directory('partners')
->required(),
])
->reorderable()
->reorderableWithButtons()
->orderColumn('position')
->addable(false)
->deletable(true)
->deleteAction(fn (Action $action) => $action->requiresConfirmation()),
])->statePath('data');
}
2 replies
FFilament
Created by Kaan on 10/9/2023 in #❓┊help
Dynamic Wizard
I'm using the Filament admin panel for Laravel and I've encountered an issue with the Wizard component in the form. When I try to proceed to the next step in the wizard, I'm getting the error: "No property found for validation: [file_name]". Here's a brief overview of my setup: I have a CategoryApplication model that has a relationship with CategoryStep. In the CustomCreateCategoryApplicationSteps page, I'm trying to dynamically generate steps in the wizard based on the CategoryStep related to the CategoryApplication. Each step in the wizard should have a TextInput component where the user can input a file name. When I try to navigate to the next step in the wizard, I encounter the error. I suspect it might be related to how I'm naming the TextInput components or how the form state is being managed, but I'm not sure. Has anyone encountered this issue before or have any insights on how to resolve it? I tried to get around the problem by doing unique naming but failed.
29 replies
FFilament
Created by Kaan on 10/9/2023 in #❓┊help
Dynamic Wizard
public $categorySteps;

public $originalCategorySteps;

public function mount($record): void
{
$categoryApplication = CategoryApplication::findOrFail($record);
$category = $categoryApplication->category;
$this->categorySteps = $category->categorySteps;

//dd($this->categorySteps);
//$this->form->fill();
}


public function form(Form $form): Form
{
$wizardSteps = [];

foreach ($this->categorySteps as $categoryStep) {
$wizardSteps[] = Wizard\Step::make($categoryStep->step_title)
->schema([
TextInput::make('file_name')
->id("category-step".$categoryStep->id)
->label('Upload File')
->required(),
]);
}

return $form
->schema([Wizard::make($wizardSteps)]);
}
}
public $categorySteps;

public $originalCategorySteps;

public function mount($record): void
{
$categoryApplication = CategoryApplication::findOrFail($record);
$category = $categoryApplication->category;
$this->categorySteps = $category->categorySteps;

//dd($this->categorySteps);
//$this->form->fill();
}


public function form(Form $form): Form
{
$wizardSteps = [];

foreach ($this->categorySteps as $categoryStep) {
$wizardSteps[] = Wizard\Step::make($categoryStep->step_title)
->schema([
TextInput::make('file_name')
->id("category-step".$categoryStep->id)
->label('Upload File')
->required(),
]);
}

return $form
->schema([Wizard::make($wizardSteps)]);
}
}
Updated
29 replies