<button class="outside-button" data-target="#dropdown-1">Toggle Dropdown 1</button>
<button class="outside-button" data-target="#dropdown-2">Toggle Dropdown 2</button>
$(document).on('click', '.outside-button', function () {
$( $(this).data('target') )
.find('.dropdown-toggle-arrow').toggleClass('rotate').end()
.find('.dropdown-content').slideToggle();
});
public function rules()
{
return [
'name' => 'required',
'name_en' => [
'required',
( $this->isMethod('patch') ) ?
Rule::unique('authors', 'name_en')->ignore($this->author->id) :
Rule::unique('authors', 'name_en'),
new AuthorUrl
],
'website' => 'nullable|url',
'vkontakte' => 'nullable|url',
'instagram' => 'nullable|url',
'poster' => 'image|mimes:jpeg,png,jpg,gif|max:2048',
];
}