Skip to content
Advertisement

Tag: laravel

Does Laravel 8 require PHP 8.1?

So.. I developed a project with Laravel 9, then I had to upload it to my client’s server by FTP ( which was slow and painful ) to find out only afterwards that my client’s server PHP version could not go over 8.0. I tried to open the project live link ( to where I uploaded ) and the composer

Undefined property: $client while trying to get some information

I’m using Laravel v5.8 and guzzlehttp of v7.4 and tried to write this Controller for getting some information: But now when I call the method getInfo, I get this error message: Undefined property: AppHttpControllersTavanmandAppResultController::$client However the docs says calling the uri’s like this. So what’s going wrong here? How can I solve this issue? Answer The scope of your $client

Category filtering in Laravel

Hey guys I’m currently trying to resolve why my legacy code doesn’t work the way it was intended to do so. It’s a basic category filter. My current problem is that I don’t really know what to fix. I tried changing up whereHas, whereIn, orWhere query statement. When I changed orWhere to just simply where, the filter worked only if

How to handle validation of multiple hidden fields

I have created a form where in many cases some fields are not displayed until user select a certain option that will make the particular field displayed, this is controlled by HTML onchange Event Attribute with functions in script. To this point everything works fine. Problem: In the Request class I am implementing some rules for validation , for all

Best way to obtain prefix and last part of url in Laravel

I have a group route like this PHP LARAVEL 9 In the controller side I want to obtain the accomodations part and the italy greece part without slashes. I’m doing like this PHP LARAVEL 9 This works but the way I’m manipulating the request in $listType seems a little bloated to me, is there a cleaner way in laravel? Answer

how to get month name from month-year (08-2022) string in php

how to get month name from month-year (08-2022) string in php i want to get this Aug-2022 (format) from my value 08-2022 I had tried date(‘m-Y’,strtotime(08-2022)) and date(’08-2022′)->format(‘m-Y’) but not working. Answer Just put a “01-” in front of your value to make it a valid date. try self: https://3v4l.org/ZiB70 or with DateTime: Important NOTE: That ! in the format

Advertisement