I am using laravel 5.3
I have a responding navigation menu, when I click on domains, it shows all the domains I already have in DB, and then when I click on one of these domains I get the corresponding projects.
Now, I am want that when I click on project it displays all the corresponding data in a table for example. But, this is what I am getting :
this is ProjectController :
public function index(Request $request)
{
$projects1=DB::table('projects')->where('domain_id', '=', 1)->get();
$projects2=DB::table('projects')->where('domain_id', '=', 2)->get();
$projects3=DB::table('projects')->where('domain_id', '=', 3)->get();
return view('projects.index',compact('projects', 'projects1', 'projects2', 'projects3'));
}
and this is index.blade.php :
<div class="nav-side-menu">
<div class="brand">Menu</div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapse out">
<li data-toggle="collapse" data-target="#products" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> Domains <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="products">
<li data-toggle="collapse" data-target="#domain1_projet" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> Domain 1 <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="domain1_projet">
#foreach ($projects1 as $key => $project)
<li>{{$project->title}}</li>
#endforeach
<table class="table table-bordered">
<tr>
<th>No</th>
<th>title</th>
<th>code</th>
<th>domain_id</th>
</tr>
#foreach ($projects1 as $key => $project1)
<tr>
<td>{{ ++$i }}</td>
<td>{{ $project1->title }}</td>
<td>{{ $project1->code }}</td>
<td>{{ $project1->domain_id}}</td>
</tr>
#endforeach
</table>
</ul>
<li data-toggle="collapse" data-target="#domain2_projet" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> Domain 2 <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="domaine2_projet">
#foreach ($projects2 as $key => $project)
<li>{{$project->title}}</li>
#endforeach
</ul>
</ul>
</ul>
</div>
</div>
the #if clause I added before table was just to test, but I need to change that. I want to be able to display data of each project not in a manual way. I also want to know how to show and hide the information of each project when clicking on the links.
As you can see in index.blade.php, It's because I already know the names of project I did if (($project->intitule)=="Title") and elseif(($project->intitule)=="Project2") But, in fact I have many projects in database. How can I be able to display all the projects and then when I click on one of them, how can get a table containing information of that specific project
CONTROLLER
public function index(Request $request)
{
$projects=DB::table('projects')->get();
return view('projects.index',compact('projects'));
}
VIEW
<div class="nav-side-menu">
<div class="brand">Menu</div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapse out">
<li data-toggle="collapse" data-target="#products" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> Domains <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="products">
#for ($i = 0; $i < count($projects); $i++)
<li data-toggle="collapse" data-target="#domain1_projet{{$i}}" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> Domain {{$projects[$i]->domain_id}} <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="domain1_projet{{$i}}">
<li>{{$projects[$i]->title}}</li>
<table class="table table-bordered">
<tr>
<th>No</th>
<th>title</th>
<th>code</th>
<th>domain_id</th>
</tr>
<tr>
<td>{{ $i }}</td>
<td>{{ $projects[$i]->title }}</td>
<td>{{ $projects[$i]->code }}</td>
<td>{{ $projects[$i]->domain_id}}</td>
</tr>
</table>
</ul>
#endfor
</ul>
</ul>
</div>
</div>
Try it! and let me know if return errors!
Related
I need to use pagination on a laravel blade, but from the controller comes another variable that does not pass pagination, how can I solve it?
<div class="main-content">
<div class="breadcrumb">
<h1>Página de Cliente</h1>
</div>
<div class="separator-breadcrumb border-top"></div>
<div class="card user-profile o-hidden mb-4">
<div class="user-info"><img class="profile-picture avatar-lg mb-2" alt="" />
<p class="m-0 text-24">{{ $customer->name }}</p>
<p class="text-muted m-0">{{ $customer->email }}</p>
</div>
<div class="card-body">
<ul class="nav nav-tabs profile-nav mb-4" id="profileTab" role="tablist">
<li class="nav-item"><a class="nav-link active" id="timeline-tab" data-toggle="tab" href="#timeline" role="tab" aria-controls="timeline" aria-selected="false">Propostas</a></li>
<li class="nav-item"><a class="nav-link" id="about-tab" data-toggle="tab" href="#about" role="tab" aria-controls="about" aria-selected="true">#</a></li>
<li class="nav-item"><a class="nav-link" id="friends-tab" data-toggle="tab" href="#friends" role="tab" aria-controls="friends" aria-selected="false">#</a></li>
<li class="nav-item"><a class="nav-link" id="photos-tab" data-toggle="tab" href="#photos" role="tab" aria-controls="photos" aria-selected="false">#</a></li>
</ul>
<div class="tab-content" id="profileTabContent">
<div class="tab-pane fade active show" id="timeline" role="tabpanel" aria-labelledby="timeline-tab">
<div class="row mb-4">
<div class="col-md-12 mb-3">
<div class="card text-left">
<div class="card-body">
<h4 class="card-title mb-3">Lista de Propostas</h4>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Data</th>
<th scope="col">Vendedor</th>
<th scope="col">Produto</th>
<th scope="col">Preço</th>
<th scope="col">Produção</th>
</tr>
</thead>
#foreach($proposals as $proposal)
<tbody>
<tr>
<th scope="row"> {{ $proposal->id_proposal }} </th>
<td> {{ $proposal->date }} </td>
<td> {{$proposal->users()->first()->name }} </td>
<td>
#foreach($proposal->proposed_phases()->get() as $proposedphase)
<p>{{ $proposedphase->features()->first()->name }}</p>
#endforeach
</td>
<td>
#foreach($proposal->proposed_phases()->get() as $proposedphase)
<p>{{ $proposedphase->amount }}€</p>
#endforeach
</td>
#if($proposal->id_production == null)
<td><span class="badge badge-danger">Produção</span></td>
#else
<td><span class="badge badge-success">Produção</span></td>
#endif
#if($proposal->id_production == null)
<td>
<a href="{{ URL::route('new.production', array('id_proposal'=>$proposal->id_proposal)) }}" class="text-success mr-2">
<button class="nav-icon i-Add font-weight-bold btn btn-success m-0" type="button" data-toggle="tooltip" data-placement="top" title="Criar Produção"></button>
</a>
</td>
#else
<td>
<a href="{{ URL::route('new.label', array('id_proposal'=>$proposal->id_proposal)) }}" class="text-success mr-2">
<button class="nav-icon i-Add font-weight-bold btn btn-warning m-0" type="button" data-toggle="tooltip" data-placement="top" title="Criar Etiquetas"></button>
</a>
</td>
#endif
</tr>
</tbody>
#endforeach
</table>
{{-- Pagination --}}
<div class="d-flex justify-content-center">
{!! $proposals->links() !!}
</div>
</div>
</div>
</div>
</div>
CONTROLLER
public function PageCustomer(Request $request)
{
$data = $request->all();
$customer = customer::where('id_customer', $data['id_customer'])->first();
$proposals = proposal::where('id_customer', $customer['id_customer'])->paginate(5);
return view('admin.customer.page_customer', compact('customer', 'proposals'));
}
the variable that does not pass to the second page is $customer
I tried to pass an array with the values of name and email, but it didn't work. how can i resolve this situation?
Use appends on Paginator :
{!! $proposals->appends(['customer' => $customer])->links() !!}
As of Laravel 7, you can call the withQueryString() method on your Paginator instance :
{!! $proposals->withQueryString()->links() !!}
withQueryString() method appends all current query string values to the pagination links.
I´m having trouble with dynamic tabs, php code works fine. The problem is with bootstrap tabs.
Already tried updating bootstrap files and it did't work!
<ul class="nav nav-tabs nav-justified tabprofile" id="outerTab" role="tablist">
#foreach($parentCategories as $count => $category)
<li class="nav-item">
<a
#if($count == 0) class="nav-link fade show active " #else class="nav-link checklist" #endif
id="{{$category->id}}-tab" data-toggle="tab" href="#{{$category->id}}"
role="tab" aria-controls="{{$category->id}}" #if($count == 0) aria-selected="true" #else aria-selected="false" #endif>{{$category->name}}</a>
</li>
#endforeach
</ul>
<div class="tab-content">
#foreach($parentCategories as $count => $category)
<div #if($count == 0) class="tab-pane fade show active" #else class="tab-pane checklist" #endif id="{{$category->id}}" role="tabpanel" aria-labelledby="{{$category->id}}-tab" >
<ul class="nav nav-tabs nav-justified" id="innerTab" role="tablist">
#foreach($category->children as $count => $sub)
<li class="nav-item">
<a class="nav-link #if($count == 0) show active #endif" id="{{$sub->id}}-tab" data-toggle="tab" href="#{{$sub->id}}"
role="tab" aria-controls="{{$sub->id}}" #if($count == 0) aria-selected="true" #else aria-selected="false" #endif>{{$sub->slug}}</a>
</li>
#endforeach
</ul>
<div class="tab-content">
#foreach($category->children as $count => $sub)
<div #if($count == 0) class="tab-pane fade show active checklist" #else class="tab-pane checklist" #endif id="{{$sub->id}}" role="tabpanel" aria-labelledby="{{$sub->id}}-tab" >
<table class="table table-bordered">
<tbody>
#foreach($checklist->objectives->where('category_id', $sub->id) as $objective)
<tr>
<th>
{{$objective->competence}} - {{$objective->title}}
</th>
<td>
#switch($objective->pivot->status)
#case('Consistente')
<span class="badge badge-success">{{$objective->pivot->status}}</span>
#break
#case('Difícil de obter')
<span class="badge badge-danger">{{$objective->pivot->status}}</span>
#break
#case('Mais ou Menos')
<span class="badge badge-warning">{{$objective->pivot->status}}</span>
#break
#default
<span class="badge badge-secondary">{{$objective->pivot->status}}</span>
#break
#endswitch
</td>
</tr>
#endforeach
</tbody>
</table>
</div><!-- level content -->
#endforeach
</div><!-- tab-content -->
</div><!-- level content -->
#endforeach
I have tried mostly everything and it does not work.
Hope anyone can help me.. Thanks
I need check My Laravel app with current logging user id(Auth) and user_id in task table and run if else command. I need show task_name in task table with different user_id. among them if user_id is equal to current I need show following items on My blade file.
#foreach ($project->tasks as $task)
<ul>
<li>
<div>
<div class="pull-right icons-align">
<i class="glyphicon glyphicon-plus"></i>
</div>
<h4><i class="fa fa-check-square-o"></i> <span>{{ $task->task_name }}
</span></h4>
</div>
</li>
</ul>
<hr>
#endforeach
and if task user_id is not equels to Auth id should display following items
#foreach ($project->tasks as $task)
<ul>
<li>
<div>
<div class="pull-right icons-align">
<i class="glyphicon glyphicon-plus"></i>
<i class="glyphicon glyphicon-pencil"></i>
<i class="glyphicon glyphicon-trash"></i>
</div>
<h4><i class="fa fa-check-square-o"></i> <span>{{ $task->task_name }}
</span></h4>
</div>
</li>
</ul>
<hr>
#endforeach
how can do this?
My task table as this
id task_name user_id
1 dfr 1
2 bgh 2
3 hyg 1
4 hyu 4
You can use the auth() helper. These helpers are available on both blade files and Controllers.
#foreach ($project->tasks as $task)
#if(auth()->user()->id == $task->user_id)
// do something
#else
// do something
#endif
#endforeach
Then that's it.
You need to compare auth user with your task user variable in if condition and then display the data like below:
#if(auth()->user()->id == $task->user_id)
#foreach ($project->tasks as $task)
<ul>
<li>
<div>
<div class="pull-right icons-align">
<a href="{{url('projects/'.$project->id.'/task/'.$task->id.'/subtask')}}" class="editInline"><i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<h4><i class="fa fa-check-square-o"></i> <span><a href="/projects/{{$project->id}}/tasks/{{ $task->id }}">{{ $task->task_name }}
</a>
</span></h4>
</div>
</li>
</ul>
<hr>
#endforeach
#else
#foreach ($project->tasks as $task)
<ul>
<li>
<div>
<div class="pull-right icons-align">
<a href="{{url('projects/'.$project->id.'/task/'.$task->id.'/subtask')}}" class="editInline"><i class="glyphicon glyphicon-plus"></i>
</a>
<i class="glyphicon glyphicon-pencil"></i>
<a href="" class="editInline"><i class="glyphicon glyphicon-trash">
</i></a>
</div>
<h4><i class="fa fa-check-square-o"></i> <span><a href="/projects/{{$project->id}}/tasks/{{ $task->id }}">{{ $task->task_name }}
</a>
</span></h4>
</div>
</li>
</ul>
<hr>
#endforeach
#endif
You can also #if condition within #foreach to just use it once if both #foreach are same and can update your code like below:
#foreach ($project->tasks as $task)
#if(auth()->user()->id == $task->user_id)
<ul>
<li>
<div>
<div class="pull-right icons-align">
<a href="{{url('projects/'.$project->id.'/task/'.$task->id.'/subtask')}}" class="editInline"><i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<h4><i class="fa fa-check-square-o"></i> <span><a href="/projects/{{$project->id}}/tasks/{{ $task->id }}">{{ $task->task_name }}
</a>
</span></h4>
</div>
</li>
</ul>
<hr>
#else
<ul>
<li>
<div>
<div class="pull-right icons-align">
<a href="{{url('projects/'.$project->id.'/task/'.$task->id.'/subtask')}}" class="editInline"><i class="glyphicon glyphicon-plus"></i>
</a>
<i class="glyphicon glyphicon-pencil"></i>
<a href="" class="editInline"><i class="glyphicon glyphicon-trash">
</i></a>
</div>
<h4><i class="fa fa-check-square-o"></i> <span><a href="/projects/{{$project->id}}/tasks/{{ $task->id }}">{{ $task->task_name }}
</a>
</span></h4>
</div>
</li>
</ul>
<hr>
#endif
#endforeach
so I keep getting this error Cannot end a section without first starting one in Laravel on my website online but localhost it is working no problem I don't see anything wrong with the code and I tried changing #stop with #endsection still the same, and I repeat I got this error on my online website, not my localhost my localhost is working fine, btw when I removed the heading section the error is gone but I need it.
here's my code
#extends('AdminPanel.master.main')
#section('heading')
Banner Details
<a style="float: right" href="/admin/banners-list" class="btn btn-primary">
<i class="fa fa-arrow-left"></i> Back To List
</a>
#stop
#section('body')
<div class="panel">
<div class="table-responsive">
<ul class="nav nav-tabs" style="margin-bottom: 2%">
<li class="nav-item">
<a class="nav-link active" href="#tab_a" data-toggle="tab">English</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#tab_b" data-toggle="tab">العربية </a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#tab_c" data-toggle="tab">Urdu </a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#tab_d" data-toggle="tab">Chinese </a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active login-tabs" id="tab_a">
<table class="table table-hover profile">
<tbody>
<tr>
<td><i class="fa fa-user fa-fw"></i>Title</td>
<td> {{$data->TitleEn}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>Caption</td>
<td> {{$data->CaptionEn}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>Image</td>
<td><img #if($data->Image)src="/admin-assests/banner/{{$data->Image}}" #endif width="200px"
height="200px"></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane login-tabs" id="tab_b">
<table class="table table-hover profile">
<tbody>
<tr>
<td><i class="fa fa-user fa-fw"></i>العنوان</td>
<td> {{$data->TitleAr}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>الوصف</td>
<td> {{$data->CaptionAr}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>Image</td>
<td><img #if($data->Image)src="/admin-assests/banner/{{$data->Image}}" #endif width="200px"
height="200px"></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane login-tabs" id="tab_c">
<table class="table table-hover profile">
<tbody>
<tr>
<td><i class="fa fa-user fa-fw"></i>العنوان</td>
<td> {{$data->TitleUr}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>الوصف</td>
<td> {{$data->CaptionUr}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>Image</td>
<td><img #if($data->Image)src="/admin-assests/banner/{{$data->Image}}" #endif width="200px"
height="200px"></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane login-tabs" id="tab_d">
<table class="table table-hover profile">
<tbody>
<tr>
<td><i class="fa fa-user fa-fw"></i>العنوان</td>
<td> {{$data->TitleCh}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>الوصف</td>
<td> {{$data->CaptionCh}}</td>
</tr>
<tr>
<td><i class="fa fa-user fa-fw"></i>Image</td>
<td><img #if($data->Image)src="/admin-assests/banner/{{$data->Image}}" #endif width="200px"
height="200px"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 pull-right">
Edit Info
</div>
</div>
#stop
main
<html lang="en">
<head>
#include('AdminPanel.master.head')
#include('AdminPanel.master.navbar')
</head>
<body>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">#yield('heading')</h1>
</div>
</div>
#yield('body')
</div>
#include('AdminPanel.master.footer')
</body>
I'm trying to display some results on a table based on few dropdown which is used for displaying different results, I choose the parameter followed the date. Unfortunately if I'm not mistaken it is illegal to have two ids on a tbody, as seen my code only takes into consideration of the date and not the parameter selected, so is there any alternative solution to what I'm trying to do?
#extends('app')
#section('header')
<link href="css/reports.css" rel="stylesheet">
#stop
#section('content')
<h1 class="page-header">Reports Archive</h1>
<div class="dropdown">
<a style="font-weight:bold" id="drop5" href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" role="button" aria-expanded="false">
Zone Options:
<span class="caret"></span>
</a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
<?php $count = 1; ?>
#foreach ($zones as $zone)
<li role="presentation" class="{{ $count == 0 ? 'active' : '' }}">
<a role="menuitem" tabindex="-1" href="#" data-target="#zone{{ $zone->id }}"> {{ $zone->zone_name }}</a></li>
<?php $count++; ?>
#endforeach
</ul>
</div>
<div role="tabpanel">
<!-- hide the below links-->
<ul class="nav nav-tabs" style="display:none;" role="tablist" id="myTab">
<?php $count = 1; ?>
#foreach ($zones as $zone)
<li role="presentation" class="{{ $count == 0 ? 'active' : '' }}">{{ $zone->zone_name }}</li>
<?php $count++; ?>
#endforeach
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php $count = 1; ?>
#foreach ($zones as $zone)
<div role="tabpanel" class="tab-pane fade in {{ $count == 0 ? 'active' : '' }}" id="zone{{ $zone->id }}">
<div class="col-md-12">
<h2> {{ $zone->zone_name }} </h2>
<table class="table table-responsive table-hover table-bordered">
<thead>
<tr>
<th style="vertical-align:middle">#</th>
<th>
<div class="dropdown">
<a style="font-weight:bold" id="drop5" href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" role="button" aria-expanded="false">
Parameter Name:
<span class="caret"></span>
</a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
#foreach ($zone->parameter as $param)
<li role="presentation">
<a class="btn btn-link" data-collapse-group="filters" data-target="#{{ $param->id }}" data-toggle="collapse">{{ $param->parameter_name }}</a></li>
#endforeach
</ul>
</div>
</th>
<th style="vertical-align:middle">Reading Value</th>
<th style="vertical-align:middle">User</th>
<th style="vertical-align:middle">Status</th>
<th style="vertical-align:middle">
<div class="dropdown" style="position:relative">
<a style="font-weight:bold" href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Timestamp
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<?php $validate = "default" ?>
<?php $records = App\Reading::sort()->get() ?>
#foreach ($records as $record)
#if ($record->created_at->year != $validate)
<li>
<a class="trigger right-caret">
{{ $record->created_at->year }}
</a>
<ul class="dropdown-menu sub-menu">
<li>January</li>
<li>February</li>
<li>March</li>
<li>April</li>
<li>May</li>
<li>June</li>
<li>July</li>
<li>August</li>
<li>September</li>
<li>October</li>
<li>November</li>
<li>December</li>
</ul>
</li>
<?php $validate = $record->created_at->year ?>
#endif
#endforeach
</ul>
</div>
</th>
</tr>
</thead>
<?php $validate = "default" ?>
#foreach ($records as $record)
#if ($record->created_at->year != $validate)
<?php $month = 1; ?>
#while ($month != 13)
#foreach ($parameters as $param)
<?php $index = 1; ?>
#if ($param->zone_id == $zone->id)
<tbody id="{{ $record->created_at->year }}-{{ $month }}" class="collapse">
#foreach ($readings as $reading)
#if ($reading->parameter_id == $param->id)
#if ($reading->created_at->year == $record->created_at->year)
#if ($reading->created_at->month == $month)
<tr>
<td>{{ $index }}</td>
<td>{{ $reading->parameter->parameter_name }} </td>
<td>{{ $reading->reading_value }} </td>
<td>{{ $reading->user->name }} </td>
<td>{{ $reading->parameter->threshold->getStatus($reading->reading_value) }} </td>
<td>{{ $reading->created_at }} </td>
</tr>
<?php $index++; ?>
#endif
#endif
#endif
#endforeach
#endif
</tbody>
</div>
#endforeach
<?php $month++; ?>
#endwhile
<?php $validate = $record->created_at->year ?>
#endif
#endforeach
</div>
</table>
</div>
</div>
<?php $count++; ?>
#endforeach
</div>
</div>
#stop
#section('scripts')
<script>
$(function(){
$(".dropdown-menu > li > a.trigger").on("click",function(e){
var current=$(this).next();
var grandparent=$(this).parent().parent();
if($(this).hasClass('left-caret')||$(this).hasClass('right-caret'))
$(this).toggleClass('right-caret left-caret');
grandparent.find('.left-caret').not(this).toggleClass('right-caret left-caret');
grandparent.find(".sub-menu:visible").not(current).hide();
current.toggle();
e.stopPropagation();
});
$(".dropdown-menu > li > a:not(.trigger)").on("click",function(){
var root=$(this).closest('.dropdown');
root.find('.left-caret').toggleClass('right-caret left-caret');
root.find('.sub-menu:visible').hide();
});
});
</script>
#stop
It is illegal to have two ids on the same HTML element, as in this example
<div id="id1" id="id2"> <!-- Here be dragons -->
You can skirt this by just having a delimeter in a single id:
<div id="id1--id2">
Or, you can use arbitrary data attributes:
<div id="" data-date="2015-10-14" data-parameter="zone_id">
Since you're using jQuery, here is a question that specifically asks about how to retrieve a data attribute.