sanjayacloud

sanjayacloud

Member Since 6 Months Ago

Experience Points 2,310
Experience
Level
Lessons Completed 3
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

14 Dec
1 month ago

sanjayacloud left a reply on Laravel.log Could Not Be Opened: Failed To Open Stream: Permission Denied

Try this inside your project folder

sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap/cache

09 Dec
1 month ago

sanjayacloud left a reply on After Login User, Redirect To Specific Path

@LJLIZARRAGA - What is this hasRole() method?

07 Dec
1 month ago

sanjayacloud left a reply on After Login User, Redirect To Specific Path

@dawgonking not yet. Do you have any idea?

30 Nov
1 month ago

sanjayacloud left a reply on After Login User, Redirect To Specific Path

@DAWGONKING - I have different user level. like user, manager, super admin, how can i handle it?

sanjayacloud started a new conversation After Login User, Redirect To Specific Path

Hello every one. I want redirect when user is login to specific path. Ex: when admin is login I need to redirect /Dashboard. how can I do it.. I try this : https://laravel.com/docs/5.7/authentication. But I fail.. Any one has a any idea.?

25 Nov
1 month ago

sanjayacloud left a reply on After Form Validation All Filled Data Have Been Reset

@AMK - After done this old value thing, I got below error. Any idea about that?

Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, string given

24 Nov
1 month ago

sanjayacloud left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, String Given,

@SERGIU17 - This is my controller and view

 public function store(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'job' => 'required',
            'ageOfDependent' => 'required| max:3| numeric',
            'creditCard' => 'required',
            'ElectricMedia' => 'required',
            'mediaSpend' => 'required',
            'civilStatus' => 'required',
            'education' => 'required',
            'jobOfDependent' => 'required',
            'creditCardOfDependent' => 'required',
            'children' => 'required',
            'brands' => 'required',
            'superMarket' => 'required',
            'superMarkets' => 'required',
            'governmentBanks' => 'required',
            'privetBanks' => 'required',
            'insurance' => 'required',
            'assets' => 'required',
            'governmentHospitals' => 'required',
            'privetHospitals' => 'required',
        ]);

        if ($validator->fails()) {
            return redirect('questions')
                ->withErrors($validator)
                ->withInput();
        }

       $data = new Question;
       $data["job"] = $request->job;
       $data["jobPosition"] = $request->jobPosition;
       $data["creditCard"] =  $request->creditCard;
       $ElectricMedia = array();
       $ElectricMedia = $request->ElectricMedia;
       $data["ElectricMedia"] = implode(",",  $ElectricMedia );
       $data["mediaSpend"] =$request->mediaSpend;
       $data["civilStatus"] = $request->civilStatus;
       $data["education"] = $request->education;
       $data["ageOfDependent"] = $request->ageOfDependent;
       $data["jobOfDependent"] = $request->jobOfDependent;
       $data["creditCardOfDependent"] = $request->creditCardOfDependent;
       $data["children"] = $request->children;
       $data["ageOfChild_1"] = $request->ageOfChild_1;
       $data["ageOfChild_2"] = $request->ageOfChild_2;
       $data["ageOfChild_3"] = $request->ageOfChild_3;
       $data["ageOfChild_4"] = $request->ageOfChild_4;
       $data["ageOfChild_5"] = $request->ageOfChild_5;
       $data[ "ageOfChild_6"] = $request->ageOfChild_6;
       $data["meals"]= $request->meals;
       $data["holiday"] = $request->holiday;
       $data["savings"] = $request->savings;
       $data["loan"] = $request->loan;
       $data["other"] = $request->other;
       $brands = array();
       $brands = $request->brands;
       $data["brands"] = implode(",", $brands);
       $data["superMarket"] = $request->superMarket;
       $superMarkets = array();
       $superMarkets = $request->superMarkets;
       $data[ "superMarkets"] = implode(",",$superMarkets);
       $governmentBanks = array();
       $governmentBanks = $request->governmentBanks;
       $data["governmentBanks"] = implode(",",$governmentBanks);
       $privetBanks = array();
       $privetBanks = $request->privetBanks;
       $data["privetBanks"] = implode(",",$privetBanks);
       $insurance = array();
       $insurance = $request->insurance;
       $data["insurance"] = implode(",", $insurance);
       $assets = array();
       $assets = $request->assets;
       $data["assets"] = implode(",",$assets);
       $data["carValue"] = $request->carValue;
       $governmentHospitals = array();
       $governmentHospitals = $request->governmentHospitals;
       $data["governmentHospitals"] = implode(",",$governmentHospitals);
       $privetHospitals = array();
       $privetHospitals = $request->privetHospitals;
       $data["privetHospitals"] =implode(",",$privetHospitals);
       $data["created_by"] = Auth::user()->id;
       $data->save();
      return back()->with('success', 'User created successfully.');

    }

 <form id="regForm" action="insert" method="post">
                @csrf
                <h3>ඔබගේ වතගොත</h3>
                <!-- One "tab" for each step in the form: -->
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ රැකියා තත්ත්වය සඳහන් කරන්න?</label>
                        <div class="col-sm-12">
                            <select id="show" class="form-control col-sm-12" name="job[]" required>
                                <option value="" >රැකියාව</option>
                                <option value="රැකියා විරහිත" {{ (collect(old('job'))->contains('රැකියා විරහිත')) ? 'selected':'' }}>රැකියා විරහිත</option>
                                <option value="පූර්ණ කාලීන සේවය" {{ (collect(old('job'))->contains('පූර්ණ කාලීන සේවය')) ? 'selected':'' }}>පූර්ණ කාලීන සේවය</option>
                                <option value="අර්ධ කාලීන සේවය" {{ (collect(old('job'))->contains('අර්ධ කාලීන සේවය')) ? 'selected':'' }}>අර්ධ කාලීන සේවය</option>
                                <option value="ගෘහණියකි" {{ (collect(old('job'))->contains('ගෘහණියකි')) ? 'selected':'' }}>ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area" class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ රැකියාවක නියුතු නම් රැකියා තනතුර සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobPosition">
                                <option value="නුපුහුණු සේවක" {{ (collect(old('jobPosition'))->contains('නුපුහුණු සේවක')) ? 'selected':'' }}>නුපුහුණු සේවක</option>
                                <option value="විධායක" {{ (collect(old('jobPosition'))->contains('විධායක')) ? 'selected':'' }}>විධායක</option>
                                <option value="කළමණාකරු" {{ (collect(old('jobPosition'))->contains('කළමණාකරු')) ? 'selected':'' }}>කළමණාකරු</option>
                                <option value="ජ්‍යෙෂ්ඨ කළමණාකරු" {{ (collect(old('job'))->contains('ජ්‍යෙෂ්ඨ කළමණාකරු')) ? 'selected':'' }}>ජ්‍යෙෂ්ඨ කළමණාකරු</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCard">
                                <option value=""></option>
                                <option value="ඔව්" {{ (collect(old('creditCard'))->contains('ඔව්')) ? 'selected':'' }}>ඔව්</option>
                                <option value="නැත" {{ (collect(old('creditCard'))->contains('නැත')) ? 'selected':'' }}>නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ භාවිතා කරන විද්‍යුත් මාධ්‍ය සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                        
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="ElectricMedia[]" multiple="multiple">
                                <option value=""></option>
                                <option value="වයිබර්" {{ (collect(old('ElectricMedia'))->contains('වයිබර්')) ? 'selected':'' }}>වයිබර්</option>
                                <option value="වට්ස් ඇප්" {{ (collect(old('ElectricMedia'))->contains('වට්ස් ඇප්')) ? 'selected':'' }}>වට්ස් ඇප්</option>
                                <option value="ෆේස්බුක්" {{ (collect(old('ElectricMedia'))->contains('ෆේස්බුක්')) ? 'selected':'' }}>අෆේස්බුක්</option>
                                <option value="යූ ටියුබ්" {{ (collect(old('ElectricMedia'))->contains('යූ ටියුබ්')) ? 'selected':'' }}>යූ ටියුබ්</option>
                                <option value="Gossip Lanka" {{ (collect(old('ElectricMedia'))->contains('Gossip Lanka')) ? 'selected':'' }}>Gossip Lanka</option>
                                <option value="Hiru News" {{ (collect(old('ElectricMedia'))->contains('Hiru News')) ? 'selected':'' }}>Hiru News</option>
                                <option value="Ada Derana" {{ (collect(old('ElectricMedia'))->contains('Ada Derana')) ? 'selected':'' }}>Ada Derana</option>
                                <option value="Linked in" {{ (collect(old('ElectricMedia'))->contains('Linked in')) ? 'selected':'' }}>Linked in</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ විද්‍යුත් මාධ්‍යය නිරත වන කාලසීමාව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="mediaSpend">
                                <option value=""></option>
                                <option value="දවසකට මිනිත්තු 0 - 30 " {{ (collect(old('mediaSpend'))->contains('දවසකට මිනිත්තු 0 - 30')) ? 'selected':'' }}>දවසකට මිනිත්තු 0 - 30 </option>
                                <option value="දවසකට මිනිත්තු 30 - පැය 1" {{ (collect(old('mediaSpend'))->contains('දවසකට මිනිත්තු 30 - පැය 1')) ? 'selected':'' }}>දවසකට මිනිත්තු 30 - පැය 1</option>
                                <option value="දවසකට පැය 1 - 2 " {{ (collect(old('mediaSpend'))->contains('දවසකට පැය 1 - 2 ')) ? 'selected':'' }}>දවසකට පැය 1 - 2 </option>
                                <option value="දවසකට පැය  2 වඩා වැඩි" {{ (collect(old('mediaSpend'))->contains('දවසකට පැය  2 වඩා වැඩි')) ? 'selected':'' }}>දවසකට පැය  2 වඩා වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ විවාහක අවිවාහක බව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="civilStatus">
                                <option value=""></option>
                                <option value="අවිවාහක"  {{ (collect(old('civilStatus'))->contains('අවිවාහක')) ? 'selected':'' }}>අවිවාහක</option>
                                <option value="විවාහක" {{ (collect(old('civilStatus'))->contains('විවාහක')) ? 'selected':'' }}>විවාහක</option>
                                <option value="වැන්දඹු" {{ (collect(old('civilStatus'))->contains('වැන්දඹු')) ? 'selected':'' }}>වැන්දඹු</option>
                                <option value="දික්කසාද" {{ (collect(old('civilStatus'))->contains('දික්කසාද')) ? 'selected':'' }}>දික්කසාද</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ අධ්‍යාපන මට්ටම සඳහන් කරන්න </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="education">
                                <option value=""></option>
                                <option value="5 ශ්‍රේණිය දක්වා" {{ (collect(old('education'))->contains('5 ශ්‍රේණිය දක්වා')) ? 'selected':'' }}>5 ශ්‍රේණිය දක්වා</option>
                                <option value="8 ශ්‍රේණිය දක්වා" {{ (collect(old('education'))->contains('8 ශ්‍රේණිය දක්වා')) ? 'selected':'' }}>8 ශ්‍රේණිය දක්වා</option>
                                <option value="සාමාන්‍ය පෙළ දක්වා" {{ (collect(old('education'))->contains('සාමාන්‍ය පෙළ දක්වා"')) ? 'selected':'' }}>සාමාන්‍ය පෙළ දක්වා</option>
                                <option value="උසස් පෙළ දක්වා" {{ (collect(old('education'))->contains('උසස් පෙළ දක්වා')) ? 'selected':'' }}>උසස් පෙළ දක්වා</option>
                                <option value="වෘත්තීය මට්ටම දක්වා" {{ (collect(old('education'))->contains('වෘත්තීය මට්ටම දක්වා')) ? 'selected':'' }}>වෘත්තීය මට්ටම දක්වා</option>
                                <option value="පශ්චාත් උපාධිය" {{ (collect(old('education'))->contains('පශ්චාත් උපාධිය')) ? 'selected':'' }}>පශ්චාත් උපාධිය </option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <p class="mt-md-4">කලත්රයාගේ (ස්වාමියා / භාර්යාවගේ) - තොරතුරු:-</p>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 ">කලත්රයාගේ වයස</label>
                        <div class="col-sm-12">
                            <input type="number"  class="form-control" name="ageOfDependent" value="{{old('ageOfDependent')}}" required autofocus>

                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">කලත්රයාගේ රැකියා තත්ත්වය  සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobOfDependent">
                                <option value=""></option>
                                <option value="නුපුහුණු සේවක" {{ (collect(old('jobOfDependent'))->contains('නුපුහුණු සේවක')) ? 'selected':'' }}>නුපුහුණු සේවක</option>
                                <option value="විධායක"  {{ (collect(old('jobOfDependent'))->contains('විධායක')) ? 'selected':'' }}>විධායක</option>
                                <option value="කළමණාකරු"  {{ (collect(old('jobOfDependent'))->contains('කළමණාකරු')) ? 'selected':'' }}>කළමණාකරු</option>
                                <option value="ජ්යෙෂ්ඨ කළමණාකරු"  {{ (collect(old('jobOfDependent'))->contains('ජ්යෙෂ්ඨ කළමණාකරු')) ? 'selected':'' }}>ජ්යෙෂ්ඨ කළමණාකරු</option>
                                <option value="ව්යාපාර හිමිකරු"  {{ (collect(old('jobOfDependent'))->contains('ව්යාපාර හිමිකරු')) ? 'selected':'' }}>ව්යාපාර හිමිකරු</option>
                                <option value="ගෘහණියකි" {{ (collect(old('jobOfDependent'))->contains('ගෘහණියකි')) ? 'selected':'' }}>ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද ?</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCardOfDependent">
                                <option value=""></option>
                                <option value="ඔව්" {{ (collect(old('creditCardOfDependent'))->contains('ඔව්')) ? 'selected':'' }}>ඔව්</option>
                                <option value="නැත" {{ (collect(old('creditCardOfDependent'))->contains('නැත')) ? 'selected':'' }}>නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">දරුවන් ගණන</label>
                        <div class="col-sm-12">
                            <select id="child" class="form-control col-sm-12" name="children">
                                <option value="">දරුවන් ගණන</option>
                                <option value="0" {{ (collect(old('children'))->contains('0')) ? 'selected':'' }}>0</option>
                                <option value="1" {{ (collect(old('children'))->contains('1')) ? 'selected':'' }}>1</option>
                                <option value="2" {{ (collect(old('children'))->contains('2')) ? 'selected':'' }}>2</option>
                                <option value="3" {{ (collect(old('children'))->contains('3')) ? 'selected':'' }}>3</option>
                                <option value="4" {{ (collect(old('children'))->contains('4')) ? 'selected':'' }}>4</option>
                                <option value="5" {{ (collect(old('children'))->contains('5')) ? 'selected':'' }}>5</option>
                                <option value="6" {{ (collect(old('children'))->contains('6')) ? 'selected':'' }}>6</option>
                            </select>
                        </div>
                        <div id="c1" class="form-group col-md-6 mt-md-3">
                            <label>පලමු දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_1" class="form-control" value="{{old('ageOfChild_1')}}">
                        </div>
                        <div id="c2" class="form-group col-md-6 mt-md-3">
                            <label >දෙවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_2" class="form-control" value="{{old('ageOfChild_2')}}">
                        </div>
                        <div id="c3" class="form-group col-md-6">
                            <label>තුන්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_3" class="form-control" value="{{old('ageOfChild_3')}}">
                        </div>
                        <div id="c4" class="form-group col-md-6">
                            <label >හතරවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_4" class="form-control" value="{{old('ageOfChild_4')}}">
                        </div>
                        <div id="c5" class="form-group col-md-6">
                            <label>පස්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_5" class="form-control" value="{{old('ageOfChild_5')}}">
                        </div>
                        <div id="c6" class="form-group col-md-6">
                            <label >සයනව දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_6" class="form-control" value="{{old('ageOfChild_6')}}">
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <p class="mt-md-5">මාසික ගෘහස්ථ වියදම</p>

                    <p id="error" class="text-danger"></p>
                    <div class="form-group row">
                        <div  class="form-group col-md-6 mt-md-3">
                            <label>ආහාර </label>
                            <input type="number" id="meals" name="meals" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >නිවාඩුව ගතකරන්න </label>
                            <input type="number" id="holiday" name="holiday" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label>ඉතිරි කිරීම්  </label>
                            <input type="number" id="savings" name="savings" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >ණය ගෙවිම </label>
                            <input type="number" id="loan" name="loan" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >අනික්</label>
                            <input type="number" id="other" name="other" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <p class="text-success mt-md-5" id="t"></p>
                        </div>

                    </div>
                    <div class="form-group row">
                        <div class="form-group col-md-6 mt-md-3">
                            <button type="button" class="btn btn-outline-warning" id="all" onclick="calculate()">එකතුව</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <p class="text-warning">ඔබගෙ මාසික වියදම් එකතුව 100% සමන වියයුතුයි</p>
                            <p class="text-warning">එකතුව බලගනීමට අවශ්‍යනම් එකතුව button එක මත click කරන්න</p>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ වැඩිපුර මිලදී ගන්නා වෙළෙඳ නාමයන් සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple " name="brands[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="එළිෆන්ට් හවුස් සොසේජස්" {{ (collect(old('brands'))->contains('එළිෆන්ට් හවුස් සොසේජස්')) ? 'selected':'' }}>එළිෆන්ට් හවුස් සොසේජස්</option>
                                <option value="එළිෆන්ට් හවුස් සිසිල් බීම" {{ (collect(old('brands'))->contains('එළිෆන්ට් හවුස් සිසිල් බීම')) ? 'selected':'' }}>එළිෆන්ට් හවුස් සිසිල් බීම</option>
                                <option value="එළිෆන්ට් හවුස් අයිස්ක්‍රීම්" {{ (collect(old('brands'))->contains('එළිෆන්ට් හවුස් අයිස්ක්‍රීම්')) ? 'selected':'' }}>එළිෆන්ට් හවුස් අයිස්ක්‍රීම් </option>
                                <option value="ඇන්කර්" {{ (collect(old('brands'))->contains('ඇන්කර්')) ? 'selected':'' }}>ඇන්කර්</option>
                                <option value="ඇස්ට්‍රා" {{ (collect(old('brands'))->contains('ඇස්ට්‍රා')) ? 'selected':'' }}>ඇස්ට්‍රා</option>
                                <option value="රින්" {{ (collect(old('brands'))->contains('රින්')) ? 'selected':'' }}>රින්</option>
                                <option value="සර්ෆෙක්සල්" {{ (collect(old('brands'))->contains('සර්ෆෙක්සල්')) ? 'selected':'' }}>සර්ෆෙක්සල්</option>
                                <option value="දීවා" {{ (collect(old('brands'))->contains('දීවා')) ? 'selected':'' }}>දීවා</option>
                                <option value="නෙස්ටමෝල්ට්" {{ (collect(old('brands'))->contains('නෙස්ටමෝල්ට්')) ? 'selected':'' }}>නෙස්ටමෝල්ට්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ වැඩිපුර බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (බොහෝ විට)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="superMarket" required>
                                <option value=""></option>
                                <option value="කීල්ස් සුපර්" {{ (collect(old('superMarket'))->contains('කීල්ස් සුපර්')) ? 'selected':'' }}>කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්" {{ (collect(old('superMarket'))->contains('කාගීල්ස්')) ? 'selected':'' }}>කාගීල්ස්</option>
                                <option value="ආර්පිකෝ" {{ (collect(old('superMarket'))->contains('ආර්පිකෝ')) ? 'selected':'' }}>ආර්පිකෝ</option>
                                <option value="ලාෆ්" {{ (collect(old('superMarket'))->contains('ලාෆ්')) ? 'selected':'' }}>ලාෆ්</option>
                                <option value="සතොස" {{ (collect(old('superMarket'))->contains('සතොස')) ? 'selected':'' }}>සතොස</option>
                                <option value="කෝප් සුපර්" {{ (collect(old('superMarket'))->contains('කෝප් සුපර්')) ? 'selected':'' }}>කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව" {{ (collect(old('superMarket'))->contains('තොග ගබඩාව')) ? 'selected':'' }}>තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්" {{ (collect(old('superMarket'))->contains('සිල්ලර බඩු වෙළෙඳසැලෙන්')) ? 'selected':'' }}>සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබ බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (වෙනත්)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="superMarkets[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="කීල්ස් සුපර්" {{ (collect(old('superMarkets'))->contains('කීල්ස් සුපර්')) ? 'selected':'' }}>කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්" {{ (collect(old('superMarkets'))->contains('කාගීල්ස්')) ? 'selected':'' }}>කාගීල්ස්</option>
                                <option value="ආර්පිකෝ" {{ (collect(old('superMarkets'))->contains('ආර්පිකෝ')) ? 'selected':'' }}>ආර්පිකෝ</option>
                                <option value="ලාෆ්" {{ (collect(old('superMarkets'))->contains('ලාෆ්')) ? 'selected':'' }}>ලාෆ්</option>
                                <option value="සතොස" {{ (collect(old('superMarkets'))->contains('සතොස')) ? 'selected':'' }}>සතොස</option>
                                <option value="කෝප් සුපර්" {{ (collect(old('superMarkets'))->contains('කෝප් සුපර්')) ? 'selected':'' }}>කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව" {{ (collect(old('superMarkets'))->contains('තොග ගබඩාව')) ? 'selected':'' }}>තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්" {{ (collect(old('superMarkets'))->contains('සිල්ලර බඩු වෙළෙඳසැලෙන්')) ? 'selected':'' }}>සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">ඔබ වැඩි වශයෙන් ගණුදෙනු කරන්නේ පහත සඳහන් කුමන බැංකු සමගද?
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">රජයේ</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentBanks[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="BOC" {{ (collect(old('governmentBanks'))->contains('BOC')) ? 'selected':'' }}>BOC</option>
                                <option value="Peoples Bank" {{ (collect(old('governmentBanks'))->contains('Peoples Bank')) ? 'selected':'' }}>Peoples Bank</option>
                                <option value="NSB" {{ (collect(old('governmentBanks'))->contains('NSB')) ? 'selected':'' }}>NSB</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetBanks[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="සම්පත් බැංකුව" {{ (collect(old('privetBanks'))->contains('සම්පත් බැංකුව')) ? 'selected':'' }}>සම්පත් බැංකුව</option>
                                <option value="කොමර්ෂල් බැංකුව" {{ (collect(old('privetBanks'))->contains('කොමර්ෂල් බැංකුව')) ? 'selected':'' }}>කොමර්ෂල් බැංකුව</option>
                                <option value="සෙලාන් බැංකුව" {{ (collect(old('privetBanks'))->contains('සෙලාන් බැංකුව')) ? 'selected':'' }}>සෙලාන් බැංකුව</option>
                                <option value="හැටන් නැෂනල් බැංකුව" {{ (collect(old('privetBanks'))->contains('හැටන් නැෂනල් බැංකුව')) ? 'selected':'' }}>හැටන් නැෂනල් බැංකුව</option>
                                <option value="NTB" {{ (collect(old('privetBanks'))->contains('NTB')) ? 'selected':'' }}>NTB</option>
                                <option value="NDB" {{ (collect(old('privetBanks'))->contains('NDB')) ? 'selected':'' }}>NDB</option>
                                <option value="DFCC" {{ (collect(old('privetBanks'))->contains('DFCC')) ? 'selected':'' }}>DFCC</option>
                                <option value="වෙනත්" {{ (collect(old('privetBanks'))->contains('වෙනත්')) ? 'selected':'' }}>වෙනත්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3"> ඔබ භාවිතා කරන ජීවිත රක‍ෂණ සමාගම් මොනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="insurance[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="කිසිවක් නැත" {{ (collect(old('insurance'))->contains('කිසිවක් නැත')) ? 'selected':'' }}>කිසිවක් නැත</option>
                                <option value="යූනියන් ඇෂුවරන්ස්" {{ (collect(old('insurance'))->contains('යූනියන් ඇෂුවරන්ස්')) ? 'selected':'' }}>යූනියන් ඇෂුවරන්ස්</option>
                                <option value="ෙලින්කෝ ඉන්ෂූවරන්ස්" {{ (collect(old('insurance'))->contains('ෙලින්කෝ ඉන්ෂූවරන්ස්')) ? 'selected':'' }}>සෙලින්කෝ ඉන්ෂූවරන්ස්</option>
                                <option value="ශ්‍රී ලංකා ඉන්ෂූවරන්ස්" {{ (collect(old('insurance'))->contains('ශ්‍රී ලංකා ඉන්ෂූවරන්ස්')) ? 'selected':'' }}>ශ්‍රී ලංකා ඉන්ෂූවරන්ස් </option>
                                <option value="AIA" {{ (collect(old('insurance'))->contains('AIA')) ? 'selected':'' }}>AIA</option>
                                <option value="වෙනත්" {{ (collect(old('insurance'))->contains('වෙනත්')) ? 'selected':'' }}>වෙනත්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ කල්පවත්නා භාණ්ඩ හිමිකම සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple show1" name="assets[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="ෆි්‍රජ්" {{ (collect(old('assets'))->contains('ෆි්‍රජ්')) ? 'selected':'' }}>ෆි්‍රජ්</option>
                                <option value="කාර්" {{ (collect(old('assets'))->contains('කාර්')) ? 'selected':'' }}>කාර්</option>
                                <option value="රූපවාහිනී" {{ (collect(old('assets'))->contains('රූපවාහිනී')) ? 'selected':'' }}>රූපවාහිනී</option>
                                <option value="රෙදි සෝදන යන්ත්‍ර" {{ (collect(old('assets'))->contains('රෙදි සෝදන යන්ත්‍ර')) ? 'selected':'' }}>රෙදි සෝදන යන්ත්‍ර</option>
                                <option value="Cable TV" {{ (collect(old('assets'))->contains('Cable TV')) ? 'selected':'' }}>Cable TV</option>
                                <option value="මෝටර් සයිකල්" {{ (collect(old('assets'))->contains('මෝටර් සයිකල්')) ? 'selected':'' }}>මෝටර් සයිකල්</option>
                                <option value="ලැප්ටොප්" {{ (collect(old('assets'))->contains('ලැප්ටොප්')) ? 'selected':'' }}>ලැප්ටොප්</option>
                                <option value="Gas cooker" {{ (collect(old('assets'))->contains('Gas cooker')) ? 'selected':'' }}>Gas cooker</option>
                                <option value="Micro Wave" {{ (collect(old('assets'))->contains('Micro Wave')) ? 'selected':'' }}>Micro Wave</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area1" class="form-group row">
                        <label class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ කරයේ වටිනාකම</label>
                        <div class="col-sm-12">
                            <select id="show1" class="form-control col-sm-12" name="carValue">
                                <option value="මිලියන  3 ට අඩු" {{ (collect(old('carValue'))->contains('මිලියන  3 ට අඩු')) ? 'selected':'' }}>මිලියන  3 ට අඩු</option>
                                <option value="මිලියන 3 ත් 10 අතර" {{ (collect(old('carValue'))->contains('මිලියන 3 ත් 10 අතර')) ? 'selected':'' }}>මිලියන 3 ත් 10 අතර</option>
                                <option value="මිලියන 10 ට වැඩි" {{ (collect(old('carValue'))->contains('මිලියන 10 ට වැඩි')) ? 'selected':'' }}>මිලියන 10 ට වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ වෛද්‍ය අවශ්‍යතා සඳහා භාවිතා කරන ස්ථාන සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentHospitals[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="රජයේ රෝහල්" {{ (collect(old('governmentHospitals'))->contains('රජයේ රෝහල්')) ? 'selected':'' }}>රජයේ රෝහල්</option>
                                <option value="පෞද්ගලික සාත්තු නිවාස" {{ (collect(old('governmentHospitals'))->contains('පෞද්ගලික සාත්තු නිවාස')) ? 'selected':'' }}>පෞද්ගලික සාත්තු නිවාස</option>
                                <option value="පවුලේ වෛද්‍යවරයා" {{ (collect(old('governmentHospitals'))->contains('පවුලේ වෛද්‍යවරයා')) ? 'selected':'' }}>පවුලේ වෛද්‍යවරයා </option>
                                <option value="ආයුර්වේද රෝහල්" {{ (collect(old('governmentHospitals'))->contains('ආයුර්වේද රෝහල්')) ? 'selected':'' }}>ආයුර්වේද රෝහල්</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික රෝහල් </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetHospitals[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="ආසිරි" {{ (collect(old('privetHospitals'))->contains('ආසිරි')) ? 'selected':'' }}>ආසිරි</option>
                                <option value="ඩර්ඩන්ස්" {{ (collect(old('privetHospitals'))->contains('ඩර්ඩන්ස්')) ? 'selected':'' }}>ඩර්ඩන්ස්</option>
                                <option value="ලංකා" {{ (collect(old('privetHospitals'))->contains('ලංකා')) ? 'selected':'' }}>ලංකා</option>
                                <option value="නවලෝක" {{ (collect(old('privetHospitals'))->contains('නවලෝක')) ? 'selected':'' }}>නවලෝක</option>
                                <option value="හේමාස්" {{ (collect(old('privetHospitals'))->contains('හේමාස්')) ? 'selected':'' }}>හේමාස්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div style="overflow:auto;">
                    <div style="float:right;">
                        <button type="button" id="prevBtn" onclick="nextPrev(-1)">Previous</button>
                        <button type="button" id="nextBtn" onclick="nextPrev(1)">Next</button>
                    </div>
                </div>
                <!-- Circles which indicates the steps of the form: -->
                <div style="text-align:center;margin-top:40px;">
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                </div>
            </form>

sanjayacloud started a new conversation Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, String Given,

Anyone know about this error?

"Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, string given,"

I got this when i insert data to db.

sanjayacloud left a reply on After Form Validation All Filled Data Have Been Reset

@AMK - Yes. I am watching now. Thanks. you are very friendly..

sanjayacloud left a reply on After Form Validation All Filled Data Have Been Reset

@AMK - It's do like this

 <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ රැකියා තත්ත්වය සඳහන් කරන්න?</label>
                        <div class="col-sm-12">
                            <select id="show" class="form-control col-sm-12" name="job" required>
                                <option value="" >රැකියාව</option>
                                <option value="රැකියා විරහිත" {{ (collect(old('options'))->contains('රැකියා විරහිත')) ? 'selected':'' }}>රැකියා විරහිත</option>
                                <option value="පූර්ණ කාලීන සේවය" {{ (collect(old('options'))->contains('පූර්ණ කාලීන සේවය')) ? 'selected':'' }}>පූර්ණ කාලීන සේවය</option>
                                <option value="අර්ධ කාලීන සේවය" {{ (collect(old('options'))->contains('අර්ධ කාලීන සේවය')) ? 'selected':'' }}>අර්ධ කාලීන සේවය</option>
                                <option value="ගෘහණියකි" {{ (collect(old('options'))->contains('ගෘහණියකි')) ? 'selected':'' }}>ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@SNAPEY - Thanks. I done with it using implode() method..

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@CRONIX - I done with it using implode() method..

sanjayacloud left a reply on After Form Validation All Filled Data Have Been Reset

@AMK - Yes. I need after validation fail. all my old value should be there.

sanjayacloud started a new conversation After Form Validation All Filled Data Have Been Reset

Hi friend, I am trying do a form validation. The form validation is successfully done. but when form is validated, my all filed data has been reset. Any one know the solution for that. My controller and view like below

 public function store(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'job' => 'required',
            'ageOfDependent' => 'required| max:2| numeric',
            'creditCard' => 'required',
            'ElectricMedia' => 'required',
            'mediaSpend' => 'required',
            'civilStatus' => 'required',
            'education' => 'required',
            'jobOfDependent' => 'required',
            'creditCardOfDependent' => 'required',
            'children' => 'required',
            'brands' => 'required',
            'superMarket' => 'required',
            'superMarkets' => 'required',
            'governmentBanks' => 'required',
            'privetBanks' => 'required',
            'insurance' => 'required',
            'assets' => 'required',
            'governmentHospitals' => 'required',
            'privetHospitals' => 'required',
        ]);

        if ($validator->fails()) {
            return redirect('questions')
                ->withErrors($validator)
                ->withInput();
        }

       $data = new Question;
       $data["job"] = $request->job;
       $data["jobPosition"] = $request->jobPosition;
       $data["creditCard"] =  $request->creditCard;
       $ElectricMedia = array();
       $ElectricMedia = $request->ElectricMedia;
       $data["ElectricMedia"] = implode(",",  $ElectricMedia );
       $data["mediaSpend"] =$request->mediaSpend;
       $data["civilStatus"] = $request->civilStatus;
       $data["education"] = $request->education;
       $data["ageOfDependent"] = $request->ageOfDependent;
       $data["jobOfDependent"] = $request->jobOfDependent;
       $data["creditCardOfDependent"] = $request->creditCardOfDependent;
       $data["children"] = $request->children;
       $data["ageOfChild_1"] = $request->ageOfChild_1;
       $data["ageOfChild_2"] = $request->ageOfChild_2;
       $data["ageOfChild_3"] = $request->ageOfChild_3;
       $data["ageOfChild_4"] = $request->ageOfChild_4;
       $data["ageOfChild_5"] = $request->ageOfChild_5;
       $data[ "ageOfChild_6"] = $request->ageOfChild_6;
       $data["meals"]= $request->meals;
       $data["holiday"] = $request->holiday;
       $data["savings"] = $request->savings;
       $data["loan"] = $request->loan;
       $data["other"] = $request->other;
       $brands = array();
       $brands = $request->brands;
       $data["brands"] = implode(",", $brands);
       $data["superMarket"] = $request->superMarket;
       $superMarkets = array();
       $superMarkets = $request->superMarkets;
       $data[ "superMarkets"] = implode(",",$superMarkets);
       $governmentBanks = array();
       $governmentBanks = $request->governmentBanks;
       $data["governmentBanks"] = implode(",",$governmentBanks);
       $privetBanks = array();
       $privetBanks = $request->privetBanks;
       $data["privetBanks"] = implode(",",$privetBanks);
       $insurance = array();
       $insurance = $request->insurance;
       $data["insurance"] = implode(",", $insurance);
       $assets = array();
       $assets = $request->assets;
       $data["assets"] = implode(",",$assets);
       $data["carValue"] = $request->carValue;
       $governmentHospitals = array();
       $governmentHospitals = $request->governmentHospitals;
       $data["governmentHospitals"] = implode(",",$governmentHospitals);
       $privetHospitals = array();
       $privetHospitals = $request->privetHospitals;
       $data["privetHospitals"] =implode(",",$privetHospitals);
       $data["created_by"] = Auth::user()->id;
       $data->save();
      return back()->with('success', 'User created successfully.');

    }
 <form id="regForm" action="insert" method="post">
                @csrf
                <h3>ඔබගේ වතගොත</h3>
                <!-- One "tab" for each step in the form: -->
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ රැකියා තත්ත්වය සඳහන් කරන්න?</label>
                        <div class="col-sm-12">
                            <select id="show" class="form-control col-sm-12" name="job" required>
                                <option value="" >රැකියාව</option>
                                <option value="රැකියා විරහිත">රැකියා විරහිත</option>
                                <option value="පූර්ණ කාලීන සේවය">පූර්ණ කාලීන සේවය</option>
                                <option value="අර්ධ කාලීන සේවය">අර්ධ කාලීන සේවය</option>
                                <option value="ගෘහණියකි">ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area" class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ රැකියාවක නියුතු නම් රැකියා තනතුර සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobPosition">
                                <option value="නුපුහුණු සේවක">නුපුහුණු සේවක</option>
                                <option value="විධායක">විධායක</option>
                                <option value="කළමණාකරු">කළමණාකරු</option>
                                <option value="ජ්‍යෙෂ්ඨ කළමණාකරු">ජ්‍යෙෂ්ඨ කළමණාකරු</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCard">
                                <option value=""></option>
                                <option value="ඔව්">ඔව්</option>
                                <option value="නැත">නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ භාවිතා කරන විද්‍යුත් මාධ්‍ය සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="ElectricMedia[]" multiple="multiple">
                                <option value=""></option>
                                <option value="රවයිබර්">වයිබර්</option>
                                <option value="වට්ස් ඇප්">වට්ස් ඇප්</option>
                                <option value="ෆේස්බුක්">අෆේස්බුක්</option>
                                <option value="යූ ටියුබ්">යූ ටියුබ්</option>
                                <option value="Gossip Lanka">Gossip Lanka</option>
                                <option value="Hiru News">Hiru News</option>
                                <option value="Ada Derana">Ada Derana</option>
                                <option value="Linked in">Linked in</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ විද්‍යුත් මාධ්‍යය නිරත වන කාලසීමාව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="mediaSpend">
                                <option value=""></option>
                                <option value="දවසකට මිනිත්තු 0 - 30 ">දවසකට මිනිත්තු 0 - 30 </option>
                                <option value="දවසකට මිනිත්තු 30 - පැය 1">දවසකට මිනිත්තු 30 - පැය 1</option>
                                <option value="දවසකට පැය 1 - 2 ">දවසකට පැය 1 - 2 </option>
                                <option value="දවසකට පැය  2 වඩා වැඩි">දවසකට පැය  2 වඩා වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ විවාහක අවිවාහක බව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="civilStatus">
                                <option value=""></option>
                                <option value="අවිවාහක">අවිවාහක</option>
                                <option value="විවාහක">විවාහක</option>
                                <option value="වැන්දඹු">වැන්දඹු</option>
                                <option value="දික්කසාද">දික්කසාද</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ අධ්‍යාපන මට්ටම සඳහන් කරන්න </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="education">
                                <option value=""></option>
                                <option value="5 ශ්‍රේණිය දක්වා">5 ශ්‍රේණිය දක්වා</option>
                                <option value="8 ශ්‍රේණිය දක්වා">8 ශ්‍රේණිය දක්වා</option>
                                <option value="සාමාන්‍ය පෙළ දක්වා">සාමාන්‍ය පෙළ දක්වා</option>
                                <option value="උසස් පෙළ දක්වා">උසස් පෙළ දක්වා</option>
                                <option value="වෘත්තීය මට්ටම දක්වා">වෘත්තීය මට්ටම දක්වා</option>
                                <option value="පශ්චාත් උපාධිය ">පශ්චාත් උපාධිය </option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">කලත්රයාගේ (ස්වාමියා / භාර්යාවගේ) - තොරතුරු:-
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">කලත්රයාගේ වයස</label>
                        <div class="col-sm-12">
                            <input type="number" class="form-control" name="ageOfDependent" required autofocus>

                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">කලත්රයාගේ රැකියා තත්ත්වය  සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobOfDependent">
                                <option value=""></option>
                                <option value="නුපුහුණු සේවක">නුපුහුණු සේවක</option>
                                <option value="විධායක">විධායක</option>
                                <option value="කළමණාකරු">කළමණාකරු</option>
                                <option value="ජ්යෙෂ්ඨ කළමණාකරු">ජ්යෙෂ්ඨ කළමණාකරු</option>
                                <option value="ව්යාපාර හිමිකරු">ව්යාපාර හිමිකරු</option>
                                <option value="ගෘහණියකි">ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද ?</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCardOfDependent">
                                <option value=""></option>
                                <option value="ඔව්">ඔව්</option>
                                <option value="නැත">නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">දරුවන් ගණන</label>
                        <div class="col-sm-12">
                            <select id="child" class="form-control col-sm-12" name="children">
                                <option value="">දරුවන් ගණන</option>
                                <option value="0">0</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                            </select>
                        </div>
                        <div id="c1" class="form-group col-md-6 mt-md-3">
                            <label>පලමු දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_1" class="form-control">
                        </div>
                        <div id="c2" class="form-group col-md-6 mt-md-3">
                            <label >දෙවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_2" class="form-control">
                        </div>
                        <div id="c3" class="form-group col-md-6">
                            <label>තුන්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_3" class="form-control" >
                        </div>
                        <div id="c4" class="form-group col-md-6">
                            <label >හතරවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_4" class="form-control">
                        </div>
                        <div id="c5" class="form-group col-md-6">
                            <label>පස්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_5" class="form-control" >
                        </div>
                        <div id="c6" class="form-group col-md-6">
                            <label >සයනව දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_6" class="form-control">
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <p class="mt-md-5">මාසික ගෘහස්ථ වියදම</p>
                    <p class="text-success" id="t"></p>
                    <p id="error"></p>
                    <div class="form-group row">
                        <div  class="form-group col-md-6 mt-md-3">
                            <label>ආහාර </label>
                            <input type="number" id="meals" name="meals" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >නිවාඩුව ගතකරන්න </label>
                            <input type="number" id="holiday" name="holiday" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label>ඉතිරි කිරීම්  </label>
                            <input type="number" id="savings" name="savings" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >ණය ගෙවිම </label>
                            <input type="number" id="loan" name="loan" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >අනික්</label>
                            <input type="number" id="other" name="other" class="form-control" value="0">
                        </div>

                    </div>
                    <div class="form-group row">
                        <div class="form-group col-md-6 mt-md-3">
                            <button type="button" class="btn btn-outline-warning" id="all" onclick="calculate()">එකතුව</button>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ වැඩිපුර මිලදී ගන්නා වෙළෙඳ නාමයන් සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="brands[]" multiple="multiple">
                                <option value=""></option>
                                <option selected value="එළිෆන්ට් හවුස් සොසේජස්">එළිෆන්ට් හවුස් සොසේජස්</option>
                                <option value="එළිෆන්ට් හවුස් සිසිල් බීම">එළිෆන්ට් හවුස් සිසිල් බීම</option>
                                <option value="එළිෆන්ට් හවුස් අයිස්ක්‍රීම්  ">එළිෆන්ට් හවුස් අයිස්ක්‍රීම්   </option>
                                <option value="ඇන්කර්">ඇන්කර්</option>
                                <option value="ඇස්ට්‍රා">ඇස්ට්‍රා</option>
                                <option value="රින්">රින්</option>
                                <option value="සර්ෆෙක්සල්">සර්ෆෙක්සල්</option>
                                <option value="දීවා">දීවා</option>
                                <option value="නෙස්ටමෝල්ට්">නෙස්ටමෝල්ට්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ වැඩිපුර බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (බොහෝ විට)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="superMarket">
                                <option value=""></option>
                                <option value="කීල්ස් සුපර්">කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්">කාගීල්ස්</option>
                                <option value="ආර්පිකෝ">ආර්පිකෝ</option>
                                <option value="ලාෆ්">ලාෆ්</option>
                                <option value="සතොස">සතොස</option>
                                <option value="කෝප් සුපර්">කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව">තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්">සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (වෙනත්)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="superMarkets[]" multiple="multiple">
                                <option value=""></option>
                                <option selected value="කීල්ස් සුපර්">කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්">කාගීල්ස්</option>
                                <option value="ආර්පිකෝ">ආර්පිකෝ</option>
                                <option value="ලාෆ්">ලාෆ්</option>
                                <option value="සතොස">සතොස</option>
                                <option value="කෝප් සුපර්">කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව">තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්">සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">ඔබ වැඩි වශයෙන් ගණුදෙනු කරන්නේ පහත සඳහන් කුමන බැංකු සමගද?
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">රජයේ</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentBanks[]" multiple="multiple" required>
                                <option  value=""></option>
                                <option selected value="BOC">BOC</option>
                                <option value="Peoples Bank">Peoples Bank</option>
                                <option value="NSB">NSB</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetBanks[]" multiple="multiple" required>
                                <option value=""></option>
                                <option selected value="සම්පත් බැංකුව">සම්පත් බැංකුව</option>
                                <option value="කොමර්ෂල් බැංකුව">කොමර්ෂල් බැංකුව</option>
                                <option value="සෙලාන් බැංකුව">සෙලාන් බැංකුව</option>
                                <option value="හැටන් නැෂනල් බැංකුව">හැටන් නැෂනල් බැංකුව</option>
                                <option value="NTB">NTB</option>
                                <option value="NDB">NDB</option>
                                <option value="DFCC">DFCC</option>
                                <option value="වෙනත්">වෙනත්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3"> ඔබ භාවිතා කරන ජීවිත රක‍ෂණ සමාගම් මොනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="insurance[]" multiple="multiple" required>
                                <option value=""></option>
                                <option selected value="කිසිවක් නැත">කිසිවක් නැත</option>
                                <option value="යූනියන් ඇෂුවරන්ස්">යූනියන් ඇෂුවරන්ස්</option>
                                <option value="ෙලින්කෝ ඉන්ෂූවරන්ස්">සෙලින්කෝ ඉන්ෂූවරන්ස්</option>
                                <option value="ශ්‍රී ලංකා ඉන්ෂූවරන්ස්">ශ්‍රී ලංකා ඉන්ෂූවරන්ස් </option>
                                <option value="AIA">AIA</option>
                                <option value="වෙනත්">වෙනත්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ කල්පවත්නා භාණ්ඩ හිමිකම සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple show1" name="assets[]" multiple="multiple" required>
                                <option value=""></option>
                                <option selected value="ෆි්‍රජ්">ෆි්‍රජ්</option>
                                <option value="කාර්">කාර්</option>
                                <option value="රූපවාහිනී">රූපවාහිනී</option>
                                <option value="රෙදි සෝදන යන්ත්‍ර">රෙදි සෝදන යන්ත්‍ර</option>
                                <option value="Cable TV">Cable TV</option>
                                <option value="මෝටර් සයිකල්">මෝටර් සයිකල්</option>
                                <option value="ලැප්ටොප්">ලැප්ටොප්</option>
                                <option value="Gas cooker">Gas cooker</option>
                                <option value="Micro Wave">Micro Wave</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area1" class="form-group row">
                        <label class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ කරයේ වටිනාකම</label>
                        <div class="col-sm-12">
                            <select id="show1" class="form-control col-sm-12" name="carValue">
                                <option value="මිලියන  3 ට අඩු">මිලියන  3 ට අඩු</option>
                                <option value="මිලියන 3 ත් 10 අතර">මිලියන 3 ත් 10 අතර</option>
                                <option value="මිලියන 10 ට වැඩි">මිලියන 10 ට වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ වෛද්‍ය අවශ්‍යතා සඳහා භාවිතා කරන ස්ථාන සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentHospitals[]" multiple="multiple" required>
                                <option value=""></option>
                                <option value="රජයේ රෝහල්">රජයේ රෝහල්</option>
                                <option value="පෞද්ගලික සාත්තු නිවාස">පෞද්ගලික සාත්තු නිවාස</option>
                                <option value="පවුලේ වෛද්‍යවරයා ">පවුලේ වෛද්‍යවරයා </option>
                                <option value="ආයුර්වේද රෝහල්">ආයුර්වේද රෝහල්</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික රෝහල් </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetHospitals[]" multiple="multiple" required>
                                <option value=""></option>
                                <option selected value="ආසිරි">ආසිරි</option>
                                <option value="ඩර්ඩන්ස්">ඩර්ඩන්ස්</option>
                                <option value="ලංකා">ලංකා</option>
                                <option value="නවලෝක">නවලෝක</option>
                                <option value="හේමාස්">හේමාස්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div style="overflow:auto;">
                    <div style="float:right;">
                        <button type="button" id="prevBtn" onclick="nextPrev(-1)">Previous</button>
                        <button type="button" id="nextBtn" onclick="nextPrev(1)">Next</button>
                    </div>
                </div>
                <!-- Circles which indicates the steps of the form: -->
                <div style="text-align:center;margin-top:40px;">
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                </div>
            </form>

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@CRONIX - i have plain it store in single column as array.how can I store it?

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@AMK - It does not work. same error given..

22 Nov
1 month ago

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@AMK - Thanks. I wil check and let you know.

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@JLRDW - That is I am trying to ask,"Are you use credit card" not the credit card details. Ok. I need how to insert array type data in column.

sanjayacloud left a reply on Array To String Conversion (SQL: Insert Into `questions

@CRONIX - @cronix i have plain it store in single column as array.how can I store it?

sanjayacloud started a new conversation Array To String Conversion (SQL: Insert Into `questions

I got above error when I insert the data.

This is my blade

   <form id="regForm" action="insert" method="post">
                @csrf
                <h3>ඔබගේ වතගොත</h3>
                <!-- One "tab" for each step in the form: -->
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ රැකියා තත්ත්වය සඳහන් කරන්න?</label>
                        <div class="col-sm-12">
                            <select id="show" class="form-control col-sm-12" name="job">
                                <option >රැකියාව</option>
                                <option  value="රැකියා විරහිත">රැකියා විරහිත</option>
                                <option value="පූර්ණ කාලීන සේවය">පූර්ණ කාලීන සේවය</option>
                                <option value="අර්ධ කාලීන සේවය">අර්ධ කාලීන සේවය</option>
                                <option value="ගෘහණියකි">ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area" class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ රැකියාවක නියුතු නම් රැකියා තනතුර සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobPosition">
                                <option value="නුපුහුණු සේවක">නුපුහුණු සේවක</option>
                                <option value="විධායක">විධායක</option>
                                <option value="කළමණාකරු">කළමණාකරු</option>
                                <option value="ජ්‍යෙෂ්ඨ කළමණාකරු">ජ්‍යෙෂ්ඨ කළමණාකරු</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCard">
                                <option value="ඔව්">ඔව්</option>
                                <option value="නැත">නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ භාවිතා කරන විද්‍යුත් මාධ්‍ය සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="ElectricMedia[]" multiple="multiple">
                                <option selected value="රවයිබර්">වයිබර්</option>
                                <option value="වට්ස් ඇප්">වට්ස් ඇප්</option>
                                <option value="ෆේස්බුක්">අෆේස්බුක්</option>
                                <option value="යූ ටියුබ්">යූ ටියුබ්</option>
                                <option value="Gossip Lanka">Gossip Lanka</option>
                                <option value="Hiru News">Hiru News</option>
                                <option value="Ada Derana">Ada Derana</option>
                                <option value="Linked in">Linked in</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ විද්‍යුත් මාධ්‍යය නිරත වන කාලසීමාව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="mediaSpend">
                                <option value="දවසකට මිනිත්තු 0 - 30 ">දවසකට මිනිත්තු 0 - 30 </option>
                                <option value="දවසකට මිනිත්තු 30 - පැය 1">දවසකට මිනිත්තු 30 - පැය 1</option>
                                <option value="දවසකට පැය 1 - 2 ">දවසකට පැය 1 - 2 </option>
                                <option value="දවසකට පැය  2 වඩා වැඩි">දවසකට පැය  2 වඩා වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ විවාහක අවිවාහක බව සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="civilStatus">
                                <option value="අවිවාහක">අවිවාහක</option>
                                <option value="විවාහක">විවාහක</option>
                                <option value="වැන්දඹු">වැන්දඹු</option>
                                <option value="දික්කසාද">දික්කසාද</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ අධ්‍යාපන මට්ටම සඳහන් කරන්න </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="education">
                                <option value="5 ශ්‍රේණිය දක්වා">5 ශ්‍රේණිය දක්වා</option>
                                <option value="8 ශ්‍රේණිය දක්වා">8 ශ්‍රේණිය දක්වා</option>
                                <option value="සාමාන්‍ය පෙළ දක්වා">සාමාන්‍ය පෙළ දක්වා</option>
                                <option value="උසස් පෙළ දක්වා">උසස් පෙළ දක්වා</option>
                                <option value="වෘත්තීය මට්ටම දක්වා">වෘත්තීය මට්ටම දක්වා</option>
                                <option value="පශ්චාත් උපාධිය ">පශ්චාත් උපාධිය </option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">කලත්රයාගේ (ස්වාමියා / භාර්යාවගේ) - තොරතුරු:-
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">කලත්රයාගේ වයස</label>
                        <div class="col-sm-12">
                            <input type="number" class="form-control" name="ageOfDependent">
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">කලත්රයාගේ රැකියා තත්ත්වය  සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="jobOfDependent">
                                <option value="නුපුහුණු සේවක">නුපුහුණු සේවක</option>
                                <option value="විධායක">විධායක</option>
                                <option value="කළමණාකරු">කළමණාකරු</option>
                                <option value="ජ්යෙෂ්ඨ කළමණාකරු">ජ්යෙෂ්ඨ කළමණාකරු</option>
                                <option value="ව්යාපාර හිමිකරු">ව්යාපාර හිමිකරු</option>
                                <option value="ගෘහණියකි">ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ක්‍රෙඩිට් කාඩ්පත් පරිහරණය කරනවාද ?</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="creditCardOfDependent">
                                <option value="ඔව්">ඔව්</option>
                                <option value="නැත">නැත</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">දරුවන් ගණන</label>
                        <div class="col-sm-12">
                            <select id="child" class="form-control col-sm-12" name="children">
                                <option selected value="0">0</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                            </select>
                        </div>
                        <div id="c1" class="form-group col-md-6 mt-md-3">
                            <label>පලමු දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_1" class="form-control" >
                        </div>
                        <div id="c2" class="form-group col-md-6 mt-md-3">
                            <label >දෙවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_2" class="form-control">
                        </div>
                        <div id="c3" class="form-group col-md-6">
                            <label>තුන්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_3" class="form-control" >
                        </div>
                        <div id="c4" class="form-group col-md-6">
                            <label >හතරවන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_4" class="form-control">
                        </div>
                        <div id="c5" class="form-group col-md-6">
                            <label>පස්වන දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_5" class="form-control" >
                        </div>
                        <div id="c6" class="form-group col-md-6">
                            <label >සයනව දරුවාගේ වයස</label>
                            <input type="number" name="ageOfChild_6" class="form-control">
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <p class="mt-md-5">මාසික ගෘහස්ථ වියදම</p>
                    <p class="text-success" id="t"></p>
                    <p id="error"></p>
                    <div class="form-group row">
                        <div  class="form-group col-md-6 mt-md-3">
                            <label>ආහාර </label>
                            <input type="number" id="meals" name="meals" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >නිවාඩුව ගතකරන්න </label>
                            <input type="number" id="holiday" name="holiday" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label>ඉතිරි කිරීම්  </label>
                            <input type="number" id="savings" name="savings" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >ණය ගෙවිම </label>
                            <input type="number" id="loan" name="loan" class="form-control" value="0">
                        </div>
                        <div class="form-group col-md-6 mt-md-3">
                            <label >අනික්</label>
                            <input type="number" id="other" name="other" class="form-control" value="0">
                        </div>

                    </div>
                    <div class="form-group row">
                        <div class="form-group col-md-6 mt-md-3">
                            <button type="button" class="btn btn-outline-warning" id="all" onclick="calculate()">එකතුව</button>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ වැඩිපුර මිලදී ගන්නා වෙළෙඳ නාමයන් සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="brands[]" multiple="multiple">
                                <option selected value="එළිෆන්ට් හවුස් සොසේජස්">එළිෆන්ට් හවුස් සොසේජස්</option>
                                <option value="එළිෆන්ට් හවුස් සිසිල් බීම">එළිෆන්ට් හවුස් සිසිල් බීම</option>
                                <option value="එළිෆන්ට් හවුස් අයිස්ක්‍රීම්  ">එළිෆන්ට් හවුස් අයිස්ක්‍රීම්   </option>
                                <option value="ඇන්කර්">ඇන්කර්</option>
                                <option value="ඇස්ට්‍රා">ඇස්ට්‍රා</option>
                                <option value="රින්">රින්</option>
                                <option value="සර්ෆෙක්සල්">සර්ෆෙක්සල්</option>
                                <option value="දීවා">දීවා</option>
                                <option value="නෙස්ටමෝල්ට්">නෙස්ටමෝල්ට්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ වැඩිපුර බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (බොහෝ විට)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12" name="superMarket">
                                <option value="කීල්ස් සුපර්">කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්">කාගීල්ස්</option>
                                <option value="ආර්පිකෝ">ආර්පිකෝ</option>
                                <option value="ලාෆ්">ලාෆ්</option>
                                <option value="සතොස">සතොස</option>
                                <option value="කෝප් සුපර්">කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව">තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්">සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබ බඩු මිලදී ගන්නා ස්ථානය සඳහන් කරන්න (වෙනත්)</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="superMarkets[]" multiple="multiple">
                                <option selected value="කීල්ස් සුපර්">කීල්ස් සුපර්</option>
                                <option value="කාගීල්ස්">කාගීල්ස්</option>
                                <option value="ආර්පිකෝ">ආර්පිකෝ</option>
                                <option value="ලාෆ්">ලාෆ්</option>
                                <option value="සතොස">සතොස</option>
                                <option value="කෝප් සුපර්">කෝප් සුපර්</option>
                                <option value="තොග ගබඩාව">තොග ගබඩාව</option>
                                <option value="සිල්ලර බඩු වෙළෙඳසැලෙන්">සිල්ලර බඩු වෙළෙඳසැලෙන්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">ඔබ වැඩි වශයෙන් ගණුදෙනු කරන්නේ පහත සඳහන් කුමන බැංකු සමගද?
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">රජයේ</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentBanks[]" multiple="multiple">
                                <option selected value="BOC">BOC</option>
                                <option value="Peoples Bank">Peoples Bank</option>
                                <option value="NSB">NSB</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetBanks[]" multiple="multiple">
                                <option selected value="සම්පත් බැංකුව">සම්පත් බැංකුව</option>
                                <option value="කොමර්ෂල් බැංකුව">කොමර්ෂල් බැංකුව</option>
                                <option value="සෙලාන් බැංකුව">සෙලාන් බැංකුව</option>
                                <option value="හැටන් නැෂනල් බැංකුව">හැටන් නැෂනල් බැංකුව</option>
                                <option value="NTB">NTB</option>
                                <option value="NDB">NDB</option>
                                <option value="DFCC">DFCC</option>
                                <option value="වෙනත්">වෙනත්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3"> ඔබ භාවිතා කරන ජීවිත රක‍ෂණ සමාගම් මොනවාද? </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="insurance[]" multiple="multiple">
                                <option selected value="කිසිවක් නැත">කිසිවක් නැත</option>
                                <option value="යූනියන් ඇෂුවරන්ස්">යූනියන් ඇෂුවරන්ස්</option>
                                <option value="ෙලින්කෝ ඉන්ෂූවරන්ස්">සෙලින්කෝ ඉන්ෂූවරන්ස්</option>
                                <option value="ශ්‍රී ලංකා ඉන්ෂූවරන්ස්">ශ්‍රී ලංකා ඉන්ෂූවරන්ස් </option>
                                <option value="AIA">AIA</option>
                                <option value="වෙනත්">වෙනත්</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ කල්පවත්නා භාණ්ඩ හිමිකම සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple show1" name="assets[]" multiple="multiple">
                                <option selected value="ෆි්‍රජ්">ෆි්‍රජ්</option>
                                <option value="කාර්">කාර්</option>
                                <option value="රූපවාහිනී">රූපවාහිනී</option>
                                <option value="රෙදි සෝදන යන්ත්‍ර">රෙදි සෝදන යන්ත්‍ර</option>
                                <option value="Cable TV">Cable TV</option>
                                <option value="මෝටර් සයිකල්">මෝටර් සයිකල්</option>
                                <option value="ලැප්ටොප්">ලැප්ටොප්</option>
                                <option value="Gas cooker">Gas cooker</option>
                                <option value="Micro Wave">Micro Wave</option>
                            </select>
                        </div>
                    </div>
                    <div id="text_area1" class="form-group row">
                        <label class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ කරයේ වටිනාකම</label>
                        <div class="col-sm-12">
                            <select id="show1" class="form-control col-sm-12" name="carValue">
                                <option value="මිලියන  3 ට අඩු">මිලියන  3 ට අඩු</option>
                                <option value="මිලියන 3 ත් 10 අතර">මිලියන 3 ත් 10 අතර</option>
                                <option value="මිලියන 10 ට වැඩි">මිලියන 10 ට වැඩි</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ වෛද්‍ය අවශ්‍යතා සඳහා භාවිතා කරන ස්ථාන සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentHospitals[]" multiple="multiple">
                                <option selected value="රජයේ රෝහල්">රජයේ රෝහල්</option>
                                <option value="පෞද්ගලික සාත්තු නිවාස">පෞද්ගලික සාත්තු නිවාස</option>
                                <option value="පවුලේ වෛද්‍යවරයා ">පවුලේ වෛද්‍යවරයා </option>
                                <option value="ආයුර්වේද රෝහල්">ආයුර්වේද රෝහල්</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික රෝහල් </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetHospitals[]" multiple="multiple">
                                <option selected value="ආසිරි">ආසිරි</option>
                                <option value="ඩර්ඩන්ස්">ඩර්ඩන්ස්</option>
                                <option value="ලංකා">ලංකා</option>
                                <option value="නවලෝක">නවලෝක</option>
                                <option value="හේමාස්">හේමාස්</option>
                            </select>

                        </div>
                    </div>
                </div>
                <div style="overflow:auto;">
                    <div style="float:right;">
                        <button type="button" id="prevBtn" onclick="nextPrev(-1)">Previous</button>
                        <button type="button" id="nextBtn" onclick="nextPrev(1)">Next</button>
                    </div>
                </div>
                <!-- Circles which indicates the steps of the form: -->
                <div style="text-align:center;margin-top:40px;">
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                </div>
            </form>

sanjayacloud left a reply on Form Validation In Select Box

@TISUCHI - @tisuchi I try like below. but it's not work..

 $request->validate([

            'job' => 'required|array|min:1',

            'jobPosition' => 'required|array|min:1',

            'governmentHospitals' => 'required|array|min:1'

     ]);

sanjayacloud started a new conversation Form Validation In Select Box

Can anyone explain about the form validation with select box. my blade like below.

        <div class="tab">
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">ඔබගේ වෛද්‍ය අවශ්‍යතා සඳහා භාවිතා කරන ස්ථාන සඳහන් කරන්න</label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="governmentHospitals[]" multiple="multiple">
                                <option selected value="රජයේ රෝහල්">රජයේ රෝහල්</option>
                                <option value="පෞද්ගලික සාත්තු නිවාස">පෞද්ගලික සාත්තු නිවාස</option>
                                <option value="පවුලේ වෛද්‍යවරයා ">පවුලේ වෛද්‍යවරයා </option>
                                <option value="ආයුර්වේද රෝහල්">ආයුර්වේද රෝහල්</option>
                            </select>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3">පෞද්ගලික රෝහල් </label>
                        <div class="col-sm-12">
                            <select class="form-control col-sm-12 js-example-basic-multiple" name="privetHospitals[]" multiple="multiple">
                                <option selected value="ආසිරි">ආසිරි</option>
                                <option value="ඩර්ඩන්ස්">ඩර්ඩන්ස්</option>
                                <option value="ලංකා">ලංකා</option>
                                <option value="නවලෝක">නවලෝක</option>
                                <option value="හේමාස්">හේමාස්</option>
                            </select>

                        </div>
                    </div>
                </div>

15 Nov
2 months ago

sanjayacloud left a reply on 500 Error When Deploy A Laravel App

@ How can I mark it?

sanjayacloud left a reply on 500 Error When Deploy A Laravel App

@aurawindsurfing & @munazzil I have sorted it. Thanks for your immediate responds.

sanjayacloud started a new conversation 500 Error When Deploy A Laravel App

Hello,

I got a 500 Error when deploy a laravel app. My laravel version is 5.4. php version is 7.0.31. This is my url:-http://dashboard.magicbox.com.sg/.

Anyone know reason for this error?

14 Nov
2 months ago

sanjayacloud left a reply on How To Do A Form Validation?

@MUNAZZIL - Thanks, It's work.. How can I validate combo box?

sanjayacloud started a new conversation How To Do A Form Validation?

Hello, Can I know, how to do form validate in laravel? My code like below..

Controller method-:

    public function store(Request $request)
    {

        $data = new Product;
        $data->name = $request->name;
        $data->description = $request->description;
        $data->price= $request->price;
        $data->stock = $request->stock;
        $data->product_type = $request->product_type;
        $data->save();
        return back()->with('success', 'Data Your files has been successfully added');

    }

View:-

<form action="" method="post" enctype="multipart/form-data">
                            {{csrf_field()}}
                            @if ($errors->any())
                                <div class="alert alert-danger">
                                    <ul>
                                        @foreach ($errors->all() as $error)
                                            <li>{{ $error }}</li>
                                        @endforeach
                                    </ul>
                                </div>
                            @endif
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <label>Name</label>
                                            <input type="text" class="form-control" name="name">
                                        </div>
                                    </div>
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <label>Category</label>
                                            <select class="form-control select2" style="width: 100%;" name="category" >
                                                <option selected="selected">Alabama</option>
                                                <option>Alaska</option>
                                                <option>California</option>
                                                <option>Delaware</option>
                                                <option>Tennessee</option>
                                                <option>Texas</option>
                                                <option>Washington</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label>Description</label>
                                    <div class="mb-3">
                                        <textarea id="editor1" name="description" style="width: 100%"></textarea>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-lg-6">
                                        <label>Price</label>
                                        <input type="number" class="form-control" name="price">
                                    </div>
                                    <div class="col-lg-6">
                                        <label>Stock</label>
                                        <input type="number" class="form-control" name="stock">
                                    </div>
                                </div>
                            <div class="row">
                               <div class="col-lg-6">
                                <div class="form-group mt-2">
                                    <label for="exampleInputFile">Single Image</label>
                                    <div class="input-group">
                                        <div class="custom-file">
                                            <input type="file" class="custom-file-input" name="image">
                                            <label class="custom-file-label" for="exampleInputFile">Choose Image</label>
                                        </div>
                                    </div>
                                </div>
                               </div>
                                <div class="col-lg-6"></div>
                            </div>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="form-group mt-2">
                                            <label for="exampleInputFile">Carousel Images</label>
                                            <div class="input-group">
                                                <div class="custom-file">
                                                    <input type="file" class="custom-file-input" name="image[]">
                                                    <label class="custom-file-label" for="exampleInputFile">Choose Image</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6"></div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <div class="form-check">
                                                <label class="form-check-label">Is this variable product?</label><br>
                                                <div class="form-check form-check-inline">
                                                    <input class="form-check-input" type="radio" name="product_type" value="1" checked>
                                                    <label class="form-check-label">No</label>
                                                </div>
                                                <div class="form-check form-check-inline">
                                                    <input class="form-check-input" type="radio" name="product_type" value="0">
                                                    <label class="form-check-label">Yes</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <!-- /.card-body -->

                            <div class="card-footer">
                                <button type="submit" class="btn btn-primary float-left">Submit</button>
                                <a href="" class="btn btn-danger float-right">Cancel</a>
                            </div>
                        </form>

sanjayacloud left a reply on Multiple Image Upload

@pardeepkumar It's ok. But, How can I upload that file to public/ upload ?

sanjayacloud left a reply on Multiple Image Upload

@georg , I did not find any submit button. I got like below view. please see my screenshot from below link.

https://drive.google.com/file/d/1v--vkqJOrBCoLCKDXegA9Z9rqCGPLXrk/view?usp=sharing

sanjayacloud started a new conversation Multiple Image Upload

Any one know how to upload multiple images in laravel.. I have form with product create. I need upload multiple images for one product.

04 Nov
2 months ago

sanjayacloud left a reply on Removing "/public" From URL (Where Does Laravel Get The Base URL From?)

Solution for this issue

rename server.php to index.php at your root directory

Then copy .htaccess file from public folder to root directory. And add below code for that

Options -MultiViews -Indexes

 

RewriteEngine On

 

# Handle Authorization Header

RewriteCond %{HTTP:Authorization} .

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

 

# Redirect Trailing Slashes If Not A Folder...

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} (.+)/$

RewriteRule ^ %1 [L,R=301]

 

# Handle Front Controller...

RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^ index.php [L]

 

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_URI} !^/public/

RewriteRule ^(css|js|images)/(.*)$ public// [L,NC]

03 Nov
2 months ago

sanjayacloud left a reply on How To Do A Config:cache As Automatically

@Snapey . I have it developed localy & upload to my vps...

01 Nov
2 months ago

sanjayacloud started a new conversation How To Do A Config:cache As Automatically

Can I know how to do a config:cache as automatically? I am using laravel 5.7...

23 Oct
2 months ago

sanjayacloud left a reply on Model Class Not Found Error

@Vilfago That's work. Thank you...

sanjayacloud left a reply on Model Class Not Found Error

@Vilfago I already defined that all variables inside the function.. please look my code above.

//Convert String Date format to mysql date format
        $tempDate = date_create($date1);
        $d1 = date_format($tempDate, $format);

        $tempDate = date_create($date2);
        $d2 = date_format($tempDate, $format);

sanjayacloud left a reply on Model Class Not Found Error

@Vilfago You are correct. I have another error like below.. "ErrorException (E_NOTICE) Undefined variable: d1"

My method..

  public function datePicker(Request $request)
    {
        $format = 'Y-m-d';
        $date = explode(' - ',$request['date']);
        $date1 = $date[0];
        $date2 = $date[1];

        //Convert String Date format to mysql date format
        $tempDate = date_create($date1);
        $d1 = date_format($tempDate, $format);

        $tempDate = date_create($date2);
        $d2 = date_format($tempDate, $format);



    $result1 = Wp_woocommerce_order_item::where('order_item_type' ,'line_item')
        ->whereHas('wp_item_meta', function ($query){
            return $query->where('meta_key','pa_tipo')
                //->where('meta_key', 'Recipient Message')
                ->where('meta_value','gift-pack');})

        ->whereHas('wp_post', function($query1){
            return  $query1->where('post_type', '=' , 'shop_order' )
                            ->whereBetween('post_date', [$d1,$d2]);
        })
        ->get();
    foreach ($result1 as $d){
        $array = array();
        $post = Wp_postmeta::where('post_id',$d->order_id)->get();
        foreach ($post as $p){
            array_push($array,$p);
        }

        dump($d);

        }


    }

sanjayacloud started a new conversation Model Class Not Found Error

Hello every one.. I have got a model class not found error. but that model is there and i have used everywhere in my app.. I got "Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'App\Http\Controllers\App\Wp_woocommerce_order_item' not found" My code as follows..

   public function datePicker(Request $request)
    {
        $format = 'Y-m-d';
        $date = explode(' - ',$request['date']);
        $date1 = $date[0];
        $date2 = $date[1];

        //Convert String Date format to mysql date format
        $tempDate = date_create($date1);
        $d1 = date_format($tempDate, $format);

        $tempDate = date_create($date2);
        $d2 = date_format($tempDate, $format);
    
    $result1 = App\Wp_woocommerce_order_item::where('order_item_type' ,'line_item')
        ->whereHas('wp_item_meta', function ($query){
            return $query->where('meta_key','pa_tipo')
                //->where('meta_key', 'Recipient Message')
                ->where('meta_value','gift-pack');})

        ->whereHas('wp_post', function($query1){
            return  $query1->where('post_type', '=' , 'shop_order' )
                            ->whereBetween('post_date', [$d1,$d2]);
        })
        ->get();
    foreach ($result1 as $d){
        $array = array();
        $post = App\Wp_postmeta::where('post_id',$d->order_id)->get();
        foreach ($post as $p){
            array_push($array,$p);
        }

        dump($d);

        }
        

    }

Look my folder structure. That not found model is there. I have highlighted that class.. Screenshot.. Visit https://drive.google.com/file/d/1mpRju06P9Cmq9fNVX80Kxh1JYH-iquDL/view?usp=sharing

20 Oct
2 months ago

sanjayacloud left a reply on Cannot Get Login User Data

@tykus That Route is work. Thanks.. @Cronix Thanks your support also. Thanks both of you..

sanjayacloud left a reply on Cannot Get Login User Data

@Cronix I changed it. But data still null..

sanjayacloud left a reply on Cannot Get Login User Data

@tykus I think Yes. If not covered by the session, How can i do this. I use below class in ProfileController

use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;


sanjayacloud left a reply on Cannot Get Login User Data

@Cronix

here's my web.php

<?php



Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', '[email protected]')->name('home');

Auth::routes();

Route::get('/home', '[email protected]')->name('home');

Route::resource('profiles', 'ProfileController');
Route::get('/profile','[email protected]');

sanjayacloud left a reply on Cannot Get Login User Data

@tykus I have properly authenticated and, I can access my user data I my /home page. I I cannot see button or for in my header.

sanjayacloud left a reply on Cannot Get Login User Data

@Cronix , When I go to /login it was redirect to /home.