jeudi 28 juin 2018

Laravel: using Javascript inside blade @if

I was wondering. It's not possible to put Javascript inside blade @if right? Is blade @if some form of php but using php code will be discouraged in view right? What should I do? Here's the logic of what I'm trying to achieve. Basically, what alternative ways are there to achieve what I'm trying to do?

@if(isToday($one_parking_info->booking_data->m_bkl_end_date) && isBeforeElevenPM() && notEndInT($one_parking_info->booking_data->m_plots_address_city))
    <button type="button" class="btn btn-primary btn-sm" onClick="cancelBooking('')">取消</button>
@endif

Aucun commentaire:

Enregistrer un commentaire