samedi 5 août 2017

syntax error, unexpected ')' foreach laravel

I try looping variable with foreach in laravel but I get error

syntax error, unexpected ')'

Here my controller

public function getAdd()
    {

        $tahun_awal_bgt = 1990;
        $tahun_skr_bgt = date('Y');

        return view('laporan.posisikeuangan_laporan')->with([
            'tahun_awal_bgt' => $tahun_awal_bgt,
            'tahun_skr_bgt' => $tahun_skr_bgt]);
    }

This my views

<div class="col-sm-2">
      <select class="form-control">
        <option>-- Semua --</option>
      @foreach($tahun_awal_bgt <= $tahun_skr_bgt)
        <option value=""></option>
        
      @endforeach
      </select>
    </div>

I still dont understand where I'am doing wrong, how do I fix this ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2v6bAAD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire