How to looping data in select tag with Laravel 5
Tag : php , By : user177837
Date : March 29 2020, 07:55 AM
hop of those help? Hi i'm beginner using Laravel 5 Framework i want to ask. how to looping data in select tags with Laravel 5 Framework. , In Laravel you will use something like this $handphones = DB::table('handphone')->all();
<select>
@foreach($handphones as $handphone)
<option value="{{$handphone->idphone}}">{{$handphone->namephone}}</option>
@endforeach
</select>
|
Laravel: Looping through Input data in Blade
Date : March 29 2020, 07:55 AM
hope this fix your issue First of all, you can't just loop over the class Input. Use Input::all() to get all items or work with the variable you're passing to the view. Then, to get the key and the value, use the normal PHP foreach syntax: @foreach($input as $name => $value)
@foreach($input as $name => $value)
{{ $name }}: {{ $value }} <br/>
@endforeach
|
How to stop looping same data in foreach laravel?
Date : March 29 2020, 07:55 AM
I hope this helps . Below are the results i get: , Do this: <?php $header = null ?>
<td data-title="Indikator" class="string">
@foreach($isi as $dataindikator)
@if ($header != $dataindikator->sub_unsur_penilaian)
<b>{{ $dataindikator->sub_unsur_penilaian }}</b><br>
<?php $header = $dataindikator->sub_unsur_penilaian ?>
@endif
{{ $dataindikator->indikator }}<br>
@endforeach
</td>
|
Laravel looping data in controller from separate DB?
Tag : php , By : UnKnownUser
Date : March 29 2020, 07:55 AM
I hope this helps . Hello i stuck with my problem, so i want to ask you for help. , Add this line above your controller class: use Illuminate\Support\Facades\DB;
$galeries = DB::table('galeries')
->join('blogs', 'galeries.kat_id', '=', 'blogs.gal_id')
->get();
|
Why looping to get data after using WHERE in Laravel?
Date : March 29 2020, 07:55 AM
it should still fix some issue Since you want to get just one object, you do not need to use get() to get a collection. Use find() to get an object by it's primary key: $board = Boards::find($id);
<a href="/topics/create/{{ $board->id }}">Create New Post</a>
|