Awcodes | Curator Image Upload Error

Hello. Whenever I try to upload and save an image on the create page, I get the following error:
SQLSTATE[HY000]: General error: 1 table media has no column named alt
INSERT INTO
"media" (
"alt",
"title",
"caption",
"description",
"disk",
"directory",
"visibility",
"name",
"path",
"exif",
"width",
"height",
"size",
"type",
"ext",
"updated_at",
"created_at"
)
VALUES
(
?,
ScreenShot,
?,
?,
public,
media,
public,
efb27e74 - b093 -4285 - 88c2 - 1876e2a2086a,
media / efb27e74 - b093 -4285 - 88c2 - 1876e2a2086a.jpg,
{ "FileName": ":-",
"FileDateTime": 1714334960,
"FileSize": 73685,
"FileType": 2,
"MimeType": "image\/jpeg",
"SectionsFound": "IFD0",
"COMPUTED": { "html": "width=\"813\" height=\"958\"",
"Height": 958,
"Width": 813,
"IsColor": 1,
"ByteOrderMotorola": 1 } },
813,
958,
73685,
image / jpeg,
jpg,
2024 -04 -28 20: 09: 22,
2024 -04 -28 20: 09: 22
)
SQLSTATE[HY000]: General error: 1 table media has no column named alt
INSERT INTO
"media" (
"alt",
"title",
"caption",
"description",
"disk",
"directory",
"visibility",
"name",
"path",
"exif",
"width",
"height",
"size",
"type",
"ext",
"updated_at",
"created_at"
)
VALUES
(
?,
ScreenShot,
?,
?,
public,
media,
public,
efb27e74 - b093 -4285 - 88c2 - 1876e2a2086a,
media / efb27e74 - b093 -4285 - 88c2 - 1876e2a2086a.jpg,
{ "FileName": ":-",
"FileDateTime": 1714334960,
"FileSize": 73685,
"FileType": 2,
"MimeType": "image\/jpeg",
"SectionsFound": "IFD0",
"COMPUTED": { "html": "width=\"813\" height=\"958\"",
"Height": 958,
"Width": 813,
"IsColor": 1,
"ByteOrderMotorola": 1 } },
813,
958,
73685,
image / jpeg,
jpg,
2024 -04 -28 20: 09: 22,
2024 -04 -28 20: 09: 22
)
Solution:
Yes, sorry my stupidity. 4 days ago I installed spatie's media librrary and they were in conflict 🙂
DK
Dennis Koch17d ago
Did you just install or did you upgrade it? Because I just installed it today and there is an alt column.
K
Kaan17d ago
I just installed
DK
Dennis Koch17d ago
What does you DB table look like?
K
Kaan17d ago
<?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();
});
}
};
<?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');
});
}
}
};
I installed again but nothing to changed I'm writing this commands:
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
DK
Dennis Koch17d ago
GitHub
filament-curator/database/migrations/create_media_table.php.stub at...
A media picker plugin for Filament Panels. Contribute to awcodes/filament-curator development by creating an account on GitHub.
DK
Dennis Koch17d ago
It has alt column
Solution
K
Kaan17d ago
Yes, sorry my stupidity. 4 days ago I installed spatie's media librrary and they were in conflict 🙂
K
Kaan17d ago
Thanks for helping!
Want results from more Discord servers?
Add your server
More Posts
Navigation Builder Parent Item / Child ItemsHi, can anyone be so kind to explain how this is supposed to work? I know that inside of resources,TextEntry roles badge translationsDear all, please advice me, how to translate roles in TextEntry badges ..., I'm try but, it's dont wActions pop showing on server too large widthAction button clicks pop acttions view too large width. how to fix it? pls help on prodcution servModal View with RelationshipHello, I show the views in a modal instead of showing them on a separate page, the relationship dataTable summary not working for accessorsHello I try to build a summary for an accessor, which counts an amount of a hasMany relationship. `numeric() function casts represents number with comma and not with dotI don't know why but the numeric function casts somehow the dot notation to comma representation. MaCombining preloaded options and search results in Forms\Components\SelectGood day, everyone! I would like to improve user experience with choosing a client from a list in a Current model in RepeatableEntryHow do I get the current model in a RepeatableEntry so I can use it in url()?how can i add requiresConfirmation when creating recordsi have trid this ```php protected function getCreateFormAction(): Action { return ActionUploading new image to a prefilled spatie media file upload not working in custom page with formsI have a custom page with forms. I have multiple file inputs. The file inputs successfully shows theSelect::selectablePlaceholder(false) not working with relationshipsI have the following select component, which correctly displays as a list of the user's leads, with Select HasMany relationship with CreateOptionAccording to the docs the ability to create a new option on the fly only supports `BelongsTo` and `BRelation Manager not in modalI need from a Relation Manager to be open not in a modal but in a new page, but that page should havHow to return the Wizard to step 1 after create success in custom page.Hello, I have created a custom page using the form following schema this form saves the data into exHaving issues with spa() and https and logoutWhen put URL::forceScheme('https') in boot() in AppServiceProvider, my panel spa() does not work. BuDynamic Form ValidationsHi, We stored different validations in database. How can we dynamically apply Filament field validatHow to dispatch filament form data using blade $dispatch methodWhen I am trying to `$dispatch` an event to send filament form data, it is not sending updated form Help Needed: Unexpected Behavior in Laravel Filament with APP_DEBUG=trueI'm encountering an issue with Laravel Filament not functioning as expected on my local development Lazy loading for Select form component optionsHey there! Is anyone aware of a way to lazy load the options of a Select form component? Right nowTabs/Costumer/installmentsHi team, I have doubts as to whether it is possible to show a list in the customer's installments ta