Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fwahyudi17's avatar

Save Button not working

I'm having the weirdest problem. I use laravel 5.6 for my web app (bukubuddy.com/dev) I have a shared hosting on production so basically i have to setup the public folder separated with the rest of the source.

This is my structure on shared hosting.

~ bukubuddy (my source code). ~ public_html (contain everything on bukubuddy's public folder)

now, everytime i copy all the content inside public folders from local to my production the save button will work fine, temporarily. then i literally does nothing else and the save button stopped working.

my first thought is because i use styling in that button that stored in public folder. and since public folder have a different structure than the laravel default, the button have a problem working properly.

Does anyone have an insight on this?

if you guys wanna try it out, register on my web (bukubuddy.com/dev), try to register and heads to dashboard section. there you will find listing section and try to create new listing. There you will find my problem.

Thanks.

0 likes
2 replies
Cronix's avatar

Is there anything useful in the logs?

1 like
fwahyudi17's avatar

i didn't found anything useful on the logs. Have you try it on my site? @Cronix , i'm afraid i didn't explained it correctly. oh, and i just found out that the very same button on edit mode works fine. The problems only occur on create mode. edit and create mode have the same form.blade.php .

<form class="form-horizontal validation-general" method="POST"
                              action="{{ isset($id) ? route('listing.update', $id) : route('listing.save') }}"
                              enctype="multipart/form-data">
                        {{ csrf_field() }}
                        @if (isset($id))
                            {{ method_field('PUT') }}
                        @endif
                        <!-- Section -->
                            <div class="add-listing-section">

                                <!-- Headline -->
                                <div class="add-listing-headline">
                                    <h3><i class="sl sl-icon-doc"></i> Basic Informations</h3>
                                </div>

                                <!-- Title -->
                                <div class="row with-forms">
                                    <div class="col-md-12">
                                        <h5>Listing Title <i class="tip" data-tip-content="Name of your business"></i>
                                        </h5>
                                        <input class="search-field" type="text" name="title"
                                               value="{{(isset($title))?$title:''}}" required/>
                                    </div>
                                </div>

                                <!-- Row -->
                                <div class="row with-forms">
                                    <!-- Status -->
                                    <div class="col-md-6">
                                        <h5>Province</h5>
                                        <select name="province_id" class="chosen-select-no-single" required>
                                            <option label="blank">Select Province</option>
                                            @foreach ($provinces as $province)
                                                <option value="{{ $province['id'] }}">{{ $province['title'] }}</option>
                                            @endforeach
                                        </select>
                                    </div>

                                    <!-- Type -->
                                    <div class="col-md-6">
                                        <h5>City</h5>
                                        <select name="city_id" class="chosen-select-no-single" required>
                                            <option label="blank">Select City</option>
                                            @foreach ($cities as $city)
                                                <option value="{{ $city['id'] }}">{{ $city['title'] }}</option>
                                            @endforeach
                                        </select>
                                    </div>


                                </div>
                                <div class="row with-forms">
                                    <!-- Status -->
                                    <div class="col-md-6">
                                        <h5>Category</h5>
                                        <select name="categories" class="chosen-select-no-single" required>
                                            <option label="blank">Select Category</option>
                                            @foreach ($categories as $category)
                                                <option value="{{ $category['id'] }}">{{ $category['title'] }}</option>
                                            @endforeach
                                        </select>
                                    </div>
                                    <div class="col-md-6">
                                        <h5>Upload Picture</h5>
                                        <input type="file" class="form-control source-image" name="image"
                                               accept="image/*" value="" required>
                                    </div>
                                </div>
                                <!-- Row / End -->

                            </div>
                            <div class="add-listing-section margin-top-45">

                                <!-- Headline -->
                                <div class="add-listing-headline">
                                    <h3><i class="sl sl-icon-docs"></i> Details</h3>
                                </div>

                                <!-- Description -->
                                <div class="form">
                                    <h5>Description</h5>
                                    <textarea class="WYSIWYG" name="description" cols="40" rows="3" id="summary"
                                              spellcheck="true"
                                              required>{{(isset($description))?$description:''}}</textarea>
                                </div>

                                <!-- Row -->
                                <div class="row with-forms">

                                    <!-- Phone -->
                                    <div class="col-md-4">
                                        <h5>Phone <span>(optional)</span></h5>
                                        <input type="text" name="phone" value="{{(isset($phone))?$phone:''}}">
                                    </div>
                                    <!-- Email Address -->
                                    <div class="col-md-4">
                                        <h5>E-mail <span>(optional)</span></h5>
                                        <input type="text" name="email" value="{{(isset($email))?$email:''}}">
                                    </div>

                                </div>
                                <!-- Row / End -->
                                <!-- Checkboxes -->
                                <h5 class="margin-top-30 margin-bottom-10">Tags <span>(optional)</span></h5>
                                <div class="checkboxes in-row margin-bottom-20">
                                    @foreach($tags as $tag)
                                        <input id="check-a" type="checkbox" name="check">
                                        <label for="check-a">{{$tag['title']}}</label>
                                    @endforeach
                                </div>
                                <!-- Checkboxes / End -->

                            </div>
                            <button type="submit" class="button preview">Save <i class="fa fa-arrow-circle-right"></i>
                            </button>
                        </form>

Please or to participate in this conversation.