issue related with pivot tables

Posted 9 months ago by rin4ik

Hey folks really need your professional help with pivot table in my create view

<div class="form-group">
              <select class="form-control select2" multiple="multiple" data-placeholder="Выберите теги" name="tags[]">
                        @if ($tags->count())
                            @foreach($tags as $tag)
                                <option value="{{ $tag->id }}">{{ $tag->title }}</option>    

I am passing tags array . after in my controller I've added method for adding other fields add method

            'title' => 'required',
            'content' => 'required',
            'date' => 'required',
            'image' => 'nullable|image'

I am passing request all which has tags fields on board it gives me error I know actual problem error because of I don't have field in my table tags but don't know to solve this issue. how to exclude tags being passed with request->all()?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.