skip to Main Content

laravel @if in datatables column

i have delete column that has delete button, i tried use @if ... @endif but the value is returning false @if(' + data.name +' == "Admin")<a class="ml-1 btnid delete-button btn btn-outline-danger" href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#modal-small2">Delete </a> @endif the data.name output is…

VIEW QUESTION

Laravel Eloquent add a WHERE xy IS NULL condition

I use Laravel 10. I try to fetch some data from my mariaDB with the following condition. $contentList = $this->get(); foreach($contentList as $content){ $this->product()->where('id', '=', $content->content_product_id)->ddRawSql(); } But the query I get is: select * from `radio_content_products` where `radio_content_products`.`id` is…

VIEW QUESTION
Back To Top
Search