NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

@section('content')
<div class="content-area py-1">
<div class="container-fluid">
<div class="box box-block bg-white">
@if(Setting::get('demo_mode') == 1)
<div class="col-md-12" style="height:50px;color:red;">
** Demo Mode : @lang('admin.demomode')
</div>
@endif
<h5 class="mb-1">Service Types</h5>
<a href="{{ route('admin.service.create') }}" style="margin-left: 1em;" class="btn btn-primary pull-right"><i class="fa fa-plus"></i> Add New Service</a>
<table class="table table-striped table-bordered dataTable" id="table-2">
<thead>
<tr>
<th>ID</th>
<th>Service Name</th>
<!-- <th>Provider Name</th> -->
<th>Capacity</th>
<th>Base Price</th>
<th>Base Distance</th>
<th>Distance Price</th>
<th>Time Price</th>
<th>Hour Price</th>
<th>Price Calculation</th>
<th>Dependent services</th>
<th>Services Types</th>
<th>Is wheel chair certificate needed?</th>
<th>Service Image</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($services as $index => $service)
<tr>
<td>{{ $index + 1 }}</td>
<td>{{ $service->name }}</td>
<!-- <td>{{ $service->provider_name }}</td> -->
<td>{{ $service->capacity }}</td>
<td>{{ currency($service->fixed) }}</td>
<td>{{ distance($service->distance) }}</td>
<td>{{ currency($service->price) }}</td>
<td>{{ currency($service->minute) }}</td>
@if($service->calculator == 'DISTANCEHOUR')
<td>{{ currency($service->hour) }}</td>
@else
<td>No Hour Price</td>
@endif
<td>@lang('servicetypes.'.$service->calculator)</td>
<td>
<select multiple="multiple" id="dependent">
@foreach($services as $sKey => $aServ)
@if($aServ->id != $service->id)
@php
$selected = false;
@endphp
@foreach($dependents as $dKey => $dependent)
@if($service->id == $dependent->id_service && $aServ->id == $dependent->id_dependent)
@php
$selected = true;
@endphp
@endif
@endforeach
<option @if($selected)selected="selected" @endif onclick="dependentStore({{$dependents}},{{$service->id}},{{$aServ->id}})" value="{{$aServ}}">{{$aServ->name}}</option>
@endif
@endforeach
</select>
</td>
@if($service->service_type == '1')
<td>Medic</td>
@else
<td>Regular</td>
@endif
@if($service->is_certificate_needed == '1')
<td>Yes</td>
@else
<td>No</td>
@endif
<td>
@if($service->image)
<img src="{{$service->image}}" style="height: 50px">
@else
N/A
@endif
</td>
<td>
<form action="{{ route('admin.service.destroy', $service->id) }}" method="POST">
{{ csrf_field() }}
{{ method_field('DELETE') }}
@if( Setting::get('demo_mode') == 0)
<a href="{{ route('admin.service.edit', $service->id) }}" class="btn btn-info btn-block">
<i class="fa fa-pencil"></i> Edit
</a>
<button class="btn btn-danger btn-block" onclick="return confirm('Are you sure?')">
<i class="fa fa-trash"></i> Delete
</button>
@endif
</form>
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>ID</th>
<th>Service Name</th>
<!-- <th>Provider Name</th> -->
<th>Capacity</th>
<th>Base Price</th>
<th>Base Distance</th>
<th>Distance Price</th>
<th>Time Price</th>
<th>Hour Price</th>
<th>Price Calculation</th>
<th>Dependent services</th>
<th>Services Types</th>
<th>Is wheel chair certificate needed?</th>
<th>Service Image</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
@endsection

@section('scripts')
<script type="text/javascript">
function dependentStore(dependents, idService, idDependent) {
console.log('dependendientes: ', dependents);
if (dependents.find(d => d.id_service == idService && d.id_dependent == idDependent)) {
$.ajax({
url: "{{route('admin.dependentStore')}}",
headers: {
'X-CSRF-TOKEN': window.Laravel.csrfToken
},
type: 'POST',
data: {
idService: idService,
idDependent: idDependent,
delete: true
},
success: function(res) {
alert('Dependent removed!')
window.location.reload();
}
})
} else {
$.ajax({
url: "{{route('admin.dependentStore')}}",
headers: {
'X-CSRF-TOKEN': window.Laravel.csrfToken
},
type: 'POST',
data: {
idService: idService,
idDependent: idDependent
},
success: function(res) {
//console.log('respuesta', res);
alert('Dependent created successfully!')
window.location.reload();
}
})
}
}
</script>
@endsection

In above code we have not changed nothing , even we did not touch the previous code and everthing was working fine from starting when we have setup the project , suddenly in above code this error "Whoops, looks like something went wrong.

1/1
FatalErrorException in helpers.php line 519:
Method IlluminateDatabaseEloquentCollection::__toString() must not throw an exception, caught InvalidArgumentException: Unexpected data found.
Unexpected data found.
A two digit minute could not be found" is coming how can we resolve this error in above line "<option @if($selected)selected="selected" @endif onclick="dependentStore({{$dependents}},{{$service->id}},{{$aServ->id}})" value="{{$aServ}}">{{$aServ->name}}</option>" this line please fix this line with a good code ?






<li> in <a title="/var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Support/helpers.php line 519" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">helpers.php line 519</a></li>





Unexpected data found.
Unexpected data found.
A two digit minute could not be found (View: /var/www/html/laravel/resources/views/admin/service/index.blade.php)
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.