Vishaal

Vishaal

Member Since 3 Months Ago

Experience Points 2,810
Experience Level 1

2,190 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 19
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

20 May
2 months ago

Vishaal left a reply on Laravel Artisan Cron Task Not Working On Ubuntu 18.10

@SNAPEY - I have setup the cron in root account. I have changed the cron now to

* * * * *       php /var/www/html/hva/artisan schedule:run >> /dev/null 2>&1

but it still not working.

Vishaal left a reply on Laravel Artisan Cron Task Not Working On Ubuntu 18.10

@SNAPEY - because the status must create invoices. But this not happens automatically but when i run manual it does it.

Vishaal started a new conversation Laravel Artisan Cron Task Not Working On Ubuntu 18.10

Hello I have enabling the cron feature for Laravel on Ubuntu 18.10 on Vultr VPS server.

I have added the cron task to the cron jobs list using the command

    crontab -e

Then I have added the command listed in the laravel documentation

    * * * * *       cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1

I have made sure that cron is running and I can see that the task is running if I run

    sudo grep -i cron /var/log/syslog|tail -3

Which returns

    May 20 20:56:01 HiRe-Pro-Web CRON[1819]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
    May 20 20:57:01 HiRe-Pro-Web CRON[1862]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
    May 20 20:58:01 HiRe-Pro-Web CRON[1898]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)

Does anyone have any suggestions where I'm going wrong here.

09 May
2 months ago

Vishaal left a reply on Join Eloquent Display Laravel

@TRAY2 - This is mine complete query

$locatie = $request['locatie']; $datum = Carbon::parse($request['datum'])->format('Y-m-d');

    $jobslist = Job::Join('ingedeeldjobs','ingedeeldjobs.job_id', '=', 'jobs.id')
                    ->Join('users', 'users.id', '=', 'ingedeeldjobs.user_id')
                    ->where('jobs.date', $datum)
                    ->where('jobs.cronstatus', 'scheduled')
                    ->where('jobs.locatie', $locatie)
                    ->get(['jobs.id','jobs.date','jobs.starttijd','jobs.eindtijd','jobs.kamernummer','jobs.locatie', 'users.first_name', 'users.last_name']);

Vishaal started a new conversation Join Eloquent Display Laravel

Hello,

I'm trying to get the result of all jobs like:

JobID date starttime endtime room location

Print who is assign to this job

first_name last_name

I have join the tables to get all result but i'm getting the result like:

[{"id":21,"date":"2019-05-09","starttijd":"15:00:00","eindtijd":"17:00:00","kamernummer":"06B12","locatie":"1","first_name":"test","last_name":"test"},
{"id":21,"date":"2019-05-09","starttijd":"15:00:00","eindtijd":"17:00:00","kamernummer":"06B12","locatie":"1","first_name":"test2","last_name":"test2"},
{"id":21,"date":"2019-05-09","starttijd":"15:00:00","eindtijd":"17:00:00","kamernummer":"06B12","locatie":"1","first_name":"test2","last_name":"test2"}]

How i can display this in the format what i required in view.

query:


        $jobslist = Job::Join('ingedeeldjobs','ingedeeldjobs.job_id', '=', 'jobs.id')
                        ->Join('users', 'users.id', '=', 'ingedeeldjobs.user_id')
                        ->where('jobs.date', $datum)
                        ->where('jobs.cronstatus', 'scheduled')
                        ->where('locatie', $locatie)
                        ->get(['jobs.id','jobs.date','jobs.starttijd','jobs.eindtijd','jobs.kamernummer','jobs.locatie', 'users.first_name', 'users.last_name']);
22 Apr
3 months ago

Vishaal left a reply on Foreach Problem

@TISUCHI - ```php @foreach($allediensten as $alledienstens) @foreach($beschikbaarheid as $beschikbaar) @if($beschikbaar->job_id !== $alledienstens->id) {{$alledienstens->id}} {{ \Carbon\Carbon::parse($alledienstens->date)->format('d-m-Y')}} {{ \Carbon\Carbon::parse($alledienstens->starttijd)->format('H:i')}} {{ \Carbon\Carbon::parse($alledienstens->eindtijd)->format('H:i')}} {{$alledienstens->kamernummer}} {{$alledienstens->aantalsurveillanten}} {{$alledienstens->locatie}} {{ \Carbon\Carbon::parse($alledienstens->beschikbaartot)->format('d-m-Y H:i')}} {{ \Carbon\Carbon::parse($alledienstens->accepttot)->format('d-m-Y H:i')}} @endif @endforeach @endforeach


this give me the result id 1, 2, 2, 3, 3 is showing.
21 Apr
3 months ago

Vishaal started a new conversation Foreach Problem

Hello,

I have foreach problem in mine project, I have 2 foreach with one if function inside it but i'm not getting the result what i must get.

what i'm trying here is build if function if the $beschikbaar->job_id and $alledienstens->id doesn't match then it must show. But this code give me result of id 2 and 3

result must be only show id 3 because the $beschikbaar->job_id content id [1 and 2]

Can anyone help me with this?

Bladecode:

                        @foreach($allediensten as $alledienstens)
                            @foreach($beschikbaarheid as $beschikbaar)
                                @if($beschikbaar->job_id != $alledienstens->id)
                                <tr>
                                    <td><input type="checkbox" class="checkbox" value="{{$alledienstens->id}}" name="checkbox[]" /></td>
                                    <td id="takenid">{{$alledienstens->id}}</td>
                                    <td>{{ \Carbon\Carbon::parse($alledienstens->date)->format('d-m-Y')}}</td>
                                    <td>{{ \Carbon\Carbon::parse($alledienstens->starttijd)->format('H:i')}}</td>
                                    <td>{{ \Carbon\Carbon::parse($alledienstens->eindtijd)->format('H:i')}}</td>
                                    <td>{{$alledienstens->kamernummer}}</td>
                                    <td>{{$alledienstens->aantalsurveillanten}}</td>
                                    <td>{{$alledienstens->locatie}}</td>
                                    <td>{{ \Carbon\Carbon::parse($alledienstens->beschikbaartot)->format('d-m-Y H:i')}}</td>
                                    <td>{{ \Carbon\Carbon::parse($alledienstens->accepttot)->format('d-m-Y H:i')}}</td>
                                </tr>
                                @endif
                                @break
                            @endforeach
                        @endforeach

$beschikbaar array

[{"job_id":1},{"job_id":2}]

$alledienstens array

[{"id":1,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"},
{"id":2,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"},
{"id":3,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"}]
14 Apr
3 months ago

Vishaal started a new conversation Multi Selection Bootstrap Insert In Database

Hello,

I'm trying to create multi selection bootstrap output to save in database but i'm getting array in mine controller like ["6","7"] How i can save this.

There is 2 selection that means 2 row must created.

Query what i was thinking:


$table = Pool_user::updateOrInsert(['pool_id' => [$string1], $user_id = $request['id']]);

Can anyone help me with this to get it solve?

12 Apr
3 months ago

Vishaal started a new conversation JSON Array Get Property

Hello,

I have an JSON array and i need to get the id of it.

[{"id":2,"title":"Default Pool","_lft":2,"_rgt":7,"parent_id":1,"created_at":"2019-04-12 18:27:50","updated_at":"2019-04-12 18:27:50"},{"id":3,"title":"sdf","_lft":3,"_rgt":4,"parent_id":2,"created_at":"2019-04-12 18:35:46","updated_at":"2019-04-12 18:35:46"}]

When i'm doing

$poolnaam = Pool::find($test2);

$id = $poolnaam->id;

it gives me the following error: Property [id] does not exist on this collection instance.

How i can get the property from the array?

Vishaal started a new conversation Convert String To Array

Hello,

Current i have an string in mine DB: 1,2,3,4,5,6, How i can convert this in array and separate them from each? How i can take only 3 from this string?

Vishaal left a reply on Treeview With ---

@MIRONMG - Relationship was added in mine model but i have add this later on the post. I have add the suggestion code but now i'm getting everything double expect the main title here is the screenshort: https://imgur.com/dQBJxTO

Vishaal left a reply on Treeview With ---

@MIRONMG - Mine table looks like


Schema::create('pools', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title');
            $table->integer('parent_id');
            $table->timestamps();
        });

still need relationship?

11 Apr
3 months ago

Vishaal started a new conversation Treeview With ---

Hello,

I'm building treeview inside mine laravel application but i have an problem with the view.

Current i'm getting everything under the same select box. Sample;

demo1 demo2 demo3

but i want this inside select options like

demo1 ---demo2 ------demo3

mine controller code


$categories = Pool::where('parent_id', '=', 0)->get();
$allCategories = Pool::pluck('title','id')->all();
return view('admin.accept', compact(['categories','allCategories']));

view:


<div class="form-group {{ $errors->has('parent_id') ? 'has-error' : '' }}">
                                        {!! Form::label('Pool:') !!}
                                        {!! Form::select('parent_id',$allCategories, old('parent_id'), ['class'=>'form-control', 'placeholder'=>'Kies uw Pool']) !!}
                                        <span class="text-danger">{{ $errors->first('parent_id') }}</span>
                                    </div>

                                    <div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
                                        {!! Form::label('Naam:') !!}
                                        {!! Form::text('title', old('title'), ['class'=>'form-control', 'placeholder'=>'Enter Title']) !!}
                                        <span class="text-danger">{{ $errors->first('title') }}</span>
                                    </div>

How i can do this?

07 Apr
3 months ago

Vishaal left a reply on Checkbox Array Saved In Database

@SNAPEY - Thank you this works.

How i can search in array?

Sample; EXP3 and EXP4?

05 Apr
3 months ago

Vishaal started a new conversation Checkbox Array Saved In Database

Hello,

I have an checkbox multiple option saved in mine database.

User1: Sample checkbox value; EXP1,EXP2,EXP3,

User2: Sample checkbox value; EXP1,EXP2,EXP4,

Is it possible to get the userid which is member of Sample checkbox value: EX3 ?

Database is:

ID, UserID, Checkbox value

I'm building this in Laravel 5.8

03 Apr
3 months ago

Vishaal started a new conversation Foreach Profiel Data

Hello,

I have create seperate table for profile data now i want to foreach this with model but i'm getting problem with this.

When i'm try to foreach this i'm getting only the users name with that content in that row. How can I foreach with where statement like specify user.

HTML code is in model.

Userid on blade: {{$users->id}}


$user_id = User::role(['Surveillant - accept', 'Surveillant - profiel'])->pluck('id');
        $users = User::find($user_id);

        $profiel = DB::table('surveillanten')
                   ->whereIn('user_id', $user_id)
                   ->get();

@foreach($profiel as $profiels)

<div class="col col-lg-6"><input type="text" class="form-control" name="voornaam" value="{{$profiels->roepnaam}}" readonly></div>
@endforeach

30 Mar
3 months ago

Vishaal started a new conversation Pool

Hello, I need something to build with pool checkboxes system.

i have an table with pool -> there i have create 10 entry with pool names.

Now i want defined users to pool but the idea what i need how to add users to multi pool.

Like user1 is member of 5 pool group User 2 is member of 3 pool group

How i can defined this under users table in 1 column?

Can a mysql table have multi ids for pool? so yes is there any sample how to do this?

Vishaal left a reply on Datatable Checkbox Invalid JSON Error

Sorry for this thread i have solved this :D

Error was because i'm loading the table from php and not from ajax get the data for refresh. I have change inside the success section for checkbox :

success:function(data)
                {
                    window.location.reload();
                }

Vishaal started a new conversation Datatable Checkbox Invalid JSON Error

Hello,

I have create datatable with checkboxes now after much try i have write the code in jquery to massremove checkbox. But when i'm executing this jquery its give me error: DataTables warning: table id=datatabel - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1


$(document).on('click', '#deletejobs', function(){
            var id = [];
            $('.checkbox:checked').each(function(){
                id.push($(this).val());
            });
            if(id.length > 0)
            {
                $.ajax({
                    url:"{{ route('aanvragertaken.massremove')}}",
                    method: "get",
                    data:{id:id},
                    success:function(data)
                    {
                        $('#datatabel').DataTable().ajax.reload();
                    }
                });
            }else{
                alert("Please select atleast one checkbox");
            }
        });

jquery for table (this works good):


$(document).ready(function() {
                $('#datatabel').DataTable( {
                    responsive: true,
                    "language": {
                        "lengthMenu": "Records _MENU_ per pagina",
                        "zeroRecords": "Geen resultaat gevonden",
                        "info": "Pagina _PAGE_ van _PAGES_",
                        "infoEmpty": "Geen resultaat gevonden",
                        "infoFiltered": "(filtered from _MAX_ total records)"
                    }
                } );
            } );


<td><input type="checkbox" class="checkbox" value="{{$takenlijst->id}}" name="checkbox[]" /></td>

What i'm doing wrong that i'm getting that invalid json?

29 Mar
3 months ago

Vishaal left a reply on Checkbox In Laravel

@THAVARSHAN - Do you have any sample for this? I need the ID for checkbox in the controller to update the database.

Vishaal started a new conversation Route To Navtab

Hello, I want create route for mine navtab menu, that i can load different controller class inside the tabs. But i'm not getting success to get the navtab on url mine url that i can create the route. Can anyone help me what i'm doing wrong or what i need to do to route direct to navtab:

<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor">
    <!-- begin:: Subheader -->
    <div class="kt-subheader kt-grid__item" id="kt_subheader">
        <div class="kt-subheader__main">
            <span class="kt-subheader__separator kt-hidden"></span> 
            <div class="kt-subheader__breadcrumbs">
                <a href="#" class="kt-subheader__breadcrumbs-home"><i class="flaticon2-shelter"></i></a>
                <span class="kt-subheader__breadcrumbs-separator"></span> <a href="home" class="kt-subheader__breadcrumbs-link"> Dashboard </a> <span class="kt-subheader__breadcrumbs-separator"></span> <a href="profile" class="kt-subheader__breadcrumbs-link"> Profiel </a>
            </div>
        </div>
    </div>
    <div class="kt-content kt-grid__item kt-grid__item--fluid" id="kt_content">
        <div class="tab-content">
            <div class="tab-pane fade show active" id="kt_tabs_1_1" role="tabpanel">
                <div class="row">
                    <div class="col-lg-4 col-xl-3">
                        <div class="kt-portlet">
                            <div  class="kt-portlet__body kt-portlet__body--fit">
                                <ul class="kt-nav kt-nav--bold kt-nav--md-space kt-nav--v3 kt-margin-t-20 kt-margin-b-20 nav nav-tabs" role="tablist">
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link active" data-toggle="tab" href="#persoonlijke_informatie">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-user-outline-symbol"></i></span>
                                            <span class="kt-nav__link-text">Persoonlijke informatie</span>
                                        </a>
                                    </li>
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link" data-toggle="tab" href="#kt_profile_tab_account_information">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-soft-icons-1"></i></span>
                                            <span class="kt-nav__link-text">Account Beveiliging</span> 
                                        </a>
                                    </li>
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link" data-toggle="tab" href="#wachtwoord_wijzigen">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-lock"></i></span>
                                            <span class="kt-nav__link-text">Wachtwoord wijzigen</span> 
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-8 col-xl-9">
                        <div class="tab-content">
                            <div class="tab-pane fade show active" id="persoonlijke_informatie">
                                <div class="kt-portlet">
                                    <div class="kt-portlet__head">
                                        <div class="kt-portlet__head-label">
                                            <h3 class="kt-portlet__head-title"> 
                                                Persoonlijke informatie
                                            </h3>
                                        </div>
                                    </div>
                                    <form class="kt-form kt-form--label-right" method="POST" action="{{ url('updateProfileAanvrager') }}">
                                    @csrf
                                        <div class="kt-portlet__body">
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">First Name</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->first_name }}" readonly>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Last Name</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->last_name }}" readonly>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Mobiel Nummer</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->mobielnummer }}" maxlength="10" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '');" placeholder="0612345678">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Email Address</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <div class="input-group">
                                                                <div class="input-group-prepend">
                                                                    <span class="input-group-text"><i class="la la-at"></i></span>
                                                                </div>
                                                                <input type="text" class="form-control" value="{{ Auth::user()->email }}" placeholder="Email" aria-describedby="basic-addon1" readonly>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            @if (Auth::check() &&  Auth::user()->hasRole('SuperAdministrator|Administrator|Aanvrager'))
                                            <div class="kt-separator kt-separator--border-dashed kt-separator--portlet-fit kt-separator--space-lg"></div>
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('success'))
                                                                    <div class="alert alert-success">
                                                                        {{ session('success') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                Onderwijsinstelling instelling:
                                                            </h3>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Faculteit naam</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="faculteitnaam" type="text" name="faculteitnaam" value="{{ Auth::user()->faculteit }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Faculteit adres</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="facilteitadres" type="text" name="facilteitadres" value="{{ Auth::user()->faculteitadres }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Budget houder</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="budgethouder" type="text" name="budgethouder" value="{{ Auth::user()->budgethouder }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Budget nummer</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="budgetnummer" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '');" type="text" name="budgetnummer" value="{{ Auth::user()->budgetnummer }}">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            @endif
                                        </div>
                                        @if (Auth::check() &&  Auth::user()->hasRole('SuperAdministrator|Administrator|Aanvrager'))
                                        <div class="kt-portlet__foot">
                                            <div class="kt-form__actions">
                                                <div class="row">
                                                    <div class="col-lg-3 col-xl-3"></div>
                                                    <div class="col-lg-9 col-xl-9">
                                                        <button type="submit" class="btn btn-primary">
                                                            {{ __('Opslaan') }}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        @endif
                                    </form>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="wachtwoord_wijzigen">
                                <div class="kt-portlet">
                                    <div class="kt-portlet__head">
                                        <div class="kt-portlet__head-label">
                                            <h3 class="kt-portlet__head-title">
                                                Change Password<small>change or reset your account password</small>
                                            </h3>
                                        </div>
                                    </div>
                                    <form class="kt-form kt-form--label-right"  method="POST" action="{{ url('updateProfileChangePassword') }}">
                                        @csrf
                                        <div class="kt-portlet__body">
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                Change Or Recover Your Password:
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('error'))
                                                                    <div class="alert alert-danger">
                                                                        {{ session('error') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('success'))
                                                                    <div class="alert alert-success">
                                                                        {{ session('success') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Current Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="current-password" type="password" class="form-control" value="" name="current-password" placeholder="New password">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">New Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="new-password" type="password" class="form-control" value="" name="new-password" placeholder="Verify password">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Verify Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="new-password-confirm" type="password" class="form-control" value="" name="new-password_confirmation" placeholder="Verify password">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="kt-portlet__foot">
                                            <div class="kt-form__actions">
                                                <div class="row">
                                                    <div class="col-lg-3 col-xl-3"></div>
                                                    <div class="col-lg-9 col-xl-9">
                                                        <button type="submit" class="btn btn-primary">
                                                            {{ __('Opslaan') }}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                </div>
                            </div>
                            <!--end: Change Password -->
                        </div>
                    </div>
                </div>
                <!--end::Row-->
            </div>
        </div>
    </div>
    <!-- end:: Content -->
</div>


<script>
    $(document).ready(function() {
    $('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
      var url = $(this).attr("href"); // the remote url for content
      var target = $(this).data("target"); // the target pane
     } );
</script>

I want create route direct to tab: #wachtwoord_wijzigen how i can let the controller redirect to this tab? if i do profile#wachtwoord_wijzigen its not working.

Can anyone help me with this?

28 Mar
3 months ago

Vishaal started a new conversation Checkbox In Laravel

Hello,

I have created an data table with checkbox, now i want some different things that can happend with checkbox. Like: Send, Deleted, etc.

Form can have only one submit how i can use multi button?

any idea how i can do this?

checkbox


<td><input type="checkbox" class="checkbox" name="{{$takenlijst->id}}" value="1" /></td>

Any idea how i can fix this out?

Vishaal left a reply on Import Excel File To Laravel Project.

@SIANGBOON - Thank you this help me with solve the problem.

27 Mar
3 months ago

Vishaal started a new conversation Import Excel File To Laravel Project.

Hello,

I have create an project with laravel for import excel files inside mysql database. The problem what i getting is import date and time inside mysql.

I'm getting the follow error code: Invalid datetime format: 1292 Incorrect date value: '43557' for column 'date' at row 1

I'm using https://github.com/Maatwebsite/Laravel-Excel for the import.

The Code of controller is:

public function import() 
    {
        Excel::import(new JobsImport,request()->file('file'));
           
        return back();
    }

Code of Class


    public function model(array $row)
    {


        return new ImportJob([
            'colm1'           => $row[0],
            'colm2'               => $row[1],
            'colm3'            => $row[2],
            'colm4'                  => $row[3],
            'colm5'              => $row[4],
            'colm6'              => $row[5],
            'colm7'                  => $row[6],
            'colm8'                  => $row[7],
            'colm9'             => $row[8],
            'colm10'              => $row[9],
            'colm11'           => $row[10],
            'colm12'   => $row[11],
            'colm13'               => $row[12],
            'colm14'          => $row[13],
            'colm15'                => $row[14],
        ]);
    }

Excel file have simple lines:

Geen 1 dummy Nederlands Ja Geen 2019-04-02 Centraal 3:00:00 PM 6:00:00 PM H1.03 10 dfj jaja aanvragerpending

Do anyone have a solution to get this solve?

26 Mar
3 months ago

Vishaal left a reply on Foreach Give Error When I'm Trying To Display It

@JOAORBRANDAO - Thank you that was the problem, it is working now..

Vishaal started a new conversation Foreach Give Error When I'm Trying To Display It

Hello,

I'm trying to foreach some property, when i'm trying in blade it give me error message:

Controller:


$vaardigheid = DB::table('instellingens')->where([
                        ['level', '=', 'Vaardigheid'],
                    ])->select('naam')->get();

        $vaardigheid = $vaardigheid->first();

return view('vaardigheid', compact('vaardigheid'));

Blade


<option>{{$vaardigheid->naam}}</option>

when i return the value on controller it give me output:

[{"naam":"dummy1"},{"naam":"dummy2"},{"naam":"dummy3"}]

error on blade:

ErrorException (E_ERROR) Trying to get property 'naam' of non-object (View: C:\xampp\htdocs\test\resources\views\aanvrager\vaardigheid.blade.php) Previous exceptions Trying to get property 'naam' of non-object (0)

why i'm getting this error message? i have use the foreach on other controller there is the same and there its working fine.