{!! $list->trip_type !!} Will print the variable.
What?
Surely you know how to write php?
<?php
if($truck->trip_type == 1) {
echo $list->trip_type;
} else {
// else
}
?>
<br><span class="btm-txt"><label title="@if ($truck->trip_type == 1){!! 'Regular Type' !!} @else {!!'Return Type' !!} @endif" data-toggle="tooltip" data-placement="bottom"> @if ($truck->trip_type == 1)<img src="{!! 'img/reg_truck.png' !!}"> @else <img src="{!! 'img/return_truck.png' !!}"> @endif</label></span></div></td>
now this one i want to write in controller...
Trip Type <br><span class="btm-txt"><label onmouseover="$(this).tooltip();" title="'. $list->trip_type .'" data-toggle="tooltip" data-placement="bottom">'.($list->trip_type).'</label><br></div></td>
in this here i want to write if else condition. iam not able to write pls help me @Snapey @zachleigh
Absolutely no idea what the question is. We cant help you if you cant explain us what you want to do.
actually their is if else condtion in laravel i used in one page.. its working perfectly ...
now one public search controller is their...in that i want to write that condition where i can call images in that
when trip_type == 1 that too.. so here in this conditon is just echoing value like trip type 1 and trip type 2 but i want to reflect image when trip type==1 and trip type ==2 other image (this condtion ) need to implement in the below code how..?
You know you need basic php skills in order to use laravel. If you cant change a string based on a condition I doubt you can use laravel correctly.
iam biggner in this field brother.. @pmall
Well if you are a beginner you should start by mastering basic programming/basic php. Laravel is a tool on top of this.
What pmall said. If you cant write even basic php statements you're going to have a lot of trouble with Laravel. Before jumping into a framework, learn php and at least a little OOP.
Please or to participate in this conversation.