Hello all,
I'm using blade and I was wondering how Can I insert a propriety "READONLY" in case of the URL is equal user.show FOR EXAMPLE:
IF \Request::route()->getName() == user.show
OR
(\Request::route()->getName() == "user.show" ? "'readonly'=> ' '," : '')
<!-- ------------- -->
<div class="input-group col-md-6">
{!!Form::text('name', $user->name,
array(
'class'=>'form-control',
'placeholder'=>'Name of User',
'readonly'=> ' ' // SET THIS VALUE AUTOMATICALLY
))!!}
</div>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community