Skip to content

Tag: laravel

how can I print user_Id from this array format?

I am using Laravel 8. I want to fetch single data and use it. Answer Please don’t use print_r to dump your records. kindly use dd() or dump(). So you have a clear idea about collections. So as of now, you fetch as if you have multiple models you can use loops.

Laravel – Correct way to catch cURL exceception

I am building a simple REST API package using cURL and would like to catch an error and then return a view. I am able to throw an error if I dd($e) but if I try and return a view it just continues with the code after the catch function. Shouldn’t PHP kill the process and just go to the

Laravel DOMDocument : failed to open stream: Permission denied

I’m trying to generate xml file in Laravel, I use DOMdocument but I got this error message when I try to save the file : Code in blade file : I know it’s something with permission but i’m not sure where to change the permission and for what. Thank you for help in advance. Answer Seems you ne…

justify content space between not working in dompdf

I have such a report that generated by DOMPDF and created with Laravel. I want to display text, one in text-align: left, and another one in text-align: right (both in a same line). But it’s not working in my code. Anybody would to help me with this issue please? I’ve been looking for this but stil…

Concatenate php in laravel

I am not very good at php. I have a function to check for an empty field and the correctness of email There is also a code in php.blade in which you need to insert this check How to do it correctly? I just pasted into @php and it doesn’t work Answer Here is a solution where you dont show