skip to Main Content

Laravel – Put a modal form in middle of the form in filament v3

How can I make 'price' to be recognized as a member of the form? public static function form(Form $form): Form { return $form ->schema([ Wizard::make([ WizardStep::make('First Step') ->schema([ TextInput::make('title')->required(), FormsComponentsActions::make([ Action::make('Custom Modal') ->button() ->form([ TextInput::make('price')->prefix('$')->required(), ]) ]), WizardStep::make('Second Step') ->schema([…

VIEW QUESTION

How can I shorten Laravel API response time?

I was pulling the data this way, but when I query with Postman, it takes too long to get the response. public function getAllItems(Request $request) { $type = $request->input('type'); $query = Item::query(); if ($type === 'series') { $query->where('is_series', true); }…

VIEW QUESTION

Crop video after upload in laravel

I have a functionality to upload videos in laravel. Now I have to crop the uploaded video first 20 seconds and need to save the cropped video into different directory. I went through this package. https://github.com/protonemedia/laravel-ffmpeg I have installed the…

VIEW QUESTION

Laravel – How can I avoid a duplicate entry error with a factory referencing two tables?

I have a table migration with a unique condition on item_id and user_id fields: Schema::create('item_user', function (Blueprint $table) { $table->id(); $table->foreignId('item_id')->references('id')->on('items')->onUpdate('RESTRICT')->onDelete('CASCADE'); $table->foreignId('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE'); $table->boolean('active')->default(false); $table->date('expires_at')->nullable(); $table->timestamps(); $table->unique(['item_id', 'active', 'user_id'], 'item_item_id_active_user_id_index'); }); I got error duplicate entry on item_id and user_id fields…

VIEW QUESTION
Back To Top
Search