What is the difference between {{ $username }} and {!! $username !!} in Laravel? Get link Facebook X Pinterest Email Other Apps - October 15, 2021 {{ $username }} is simply used to display text contents but {!! $username !!} is used to display content with HTML tags if exists. Get link Facebook X Pinterest Email Other Apps
How to use Where null and Where not null eloquent query in Laravel? - October 15, 2021 Where Null Query DB::table('users')->whereNull('name')->get(); Where Not Null Query DB::table('users')->whereNotNull('name')->get(); Read more
Ajax Toggle(on/off) on-click Update - July 18, 2019 example Index : < td > < a href= "javascript:void(0)" data-toggle= "tooltip" onclick= " toggleProductStaple({{ $item -> id }},{{ $item -> is_staple }}) " > @if ( $item -> is_staple === 1 ) < i data-toggle= "tooltip" data-original-title= "Active" class= "fa fa-toggle-on text-inverse m-r-10" ></ i > @else < i data-toggle= "tooltip" data-original-title= "Inactive" class= "fa fa-toggle-off text-inverse m-r-10" ></ i > @endif </ a > </ td > function: < script > function toggleProductStaple (product_id, is_staple) { $ . ajaxSetup ({ headers : { 'X-CSRF-TOKEN' : $ ( ' meta [name="_token"]' ). attr ( 'content' ) } }); $ . ajax ({ type : "post... Read more
Yii Framework In Update Time View Image In Form - April 16, 2019 Example [ 'attribute'=>'Image', 'label'=>'image', 'format'=>'html', 'value'=>function($data) { return Html::img(Yii::$app->params['imageuploadurl'].$data['Image'], ['width'=>'100','height'=>'50'],['alt'=>'yii']); }, ], --- Form In---- <?= $form->field($model, 'file')->fileInput() ?> <?= Html::img(Yii::$app->params['imageuploadurl'].$model->Image,['width'=>'100','height'=>'50'],['alt'=>'yii']); ?> NOTE : (... Read more