mercredi 13 septembre 2023

"Your requirements could not be resolved to an installable set of packages"

I'm attempting to run an existing Laravel project that I downloaded from GitHub. When I type 'composer update,' I encounter the following error (please refer to the attached image).

Could the reason behind this error be that my PHP version doesn't match the version specified in the project I downloaded?

error massage

Explain this to me



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/Mzlhcam
via IFTTT

Metamask Dapp Browser Not Redirecting from HTTP to HTTPS on Certain Mobile Phones

I'm developing a web-based decentralized application (Dapp) that interacts with Ethereum using Metamask. I've noticed an issue with the Metamask Dapp browser on some mobile phones. When users type a URL with the http protocol instead of https, the Dapp browser does not automatically redirect to the secure https version of the website.

On most mobile phones, this redirection works as expected, but on a subset of devices, it doesn't. This behavior is causing a security concern as the application relies on HTTPS to ensure the confidentiality and integrity of data.

Here are some details:

  • The web server is properly configured to handle both HTTP and HTTPS requests.
  • The APP_URL in my Laravel application is set to use https in the .env file.
  • The Metamask extension is up to date on all devices.

I'd like to understand why this issue is occurring and if there are any specific settings or configurations I need to adjust to ensure that the Metamask Dapp browser consistently redirects from HTTP to HTTPS on all mobile devices.

Has anyone encountered a similar issue with Metamask on mobile phones, and if so, how did you resolve it? Any insights or guidance on this matter would be greatly appreciated.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/YGrdpPj
via IFTTT

lundi 11 septembre 2023

laravel-permission Is there a binding relationship between permissions and routes when the user middleware determines permissions?

For example, in the following figure: permission:member_info|member_add is added to the member routing group. If a user has one of these two permissions, the entire member routing can be accessed. Do we have to write them down on specific routes one by one? That's a lot. It doesn't feel that way. If it is not written in the specific route, how should this permission and route be bound? enter image description here

I don't know what to do at the moment, but I feel that it is unscientific to write on the route one by one.

Like the previous comparison url, the permission is the url, which is checked from the data table and compared with the current request url



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/WZGIjU6
via IFTTT

lundi 4 septembre 2023

Connecting to an SFTP using Storage in Laravel

I Stumbled upon (not sure if its unique) a very tricky situation , when I try to connect to an SFTP with invalid credentials or is not enabled.

The first time I try to connect to SFTP which is not available it throws me proper error message but If I try to reconnect to same SFTP within a minute or 2 it does not throw any exception, I tested the same via php artisan tinker of LARAVEL.

    function conectToSFTP()
    {
        $diskName = 'sftp_name';
        try {
            $disk = Storage::disk($diskName);
            $files = $disk->files('/');
            echo "connected to sftp";
        } catch (\Exception $e) {
            echo "Unable to connect to SFTP " . $e->getMessage();
        }
    }

enter image description here

How can I get proper error message second time as well. Due to some reason or based on some condition I have to call

Storage::disk($diskName);

twice.

I tried adding a time delay using

sleep(45);

but that didnt worked



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/KBZVkdm
via IFTTT

Xlsx file not able to read data in laravel 5.2

I am using laravel 5.2 and "maatwebsite/excel": "~2.1.0", I am not able to read xlsx file data i am getting response empty data My code is here

Excel::load($filePathNew, function($reader) {
$results = $reader-\>get();
$results = $reader-\>all();
dd($results);
});


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/WR1I4nf
via IFTTT

vendredi 1 septembre 2023

Seeking Guidance for Migrating Laravel 5.4 Web App to a New Domain [closed]

I'm in need of your valuable advice.

We are currently working on a Laravel project, and our Laravel web app is connected to a mobile app via an API. Now, we're planning to move the web app to a new domain. However, there's a catch - our Laravel version is a very outdated 5.4 version, and unfortunately, we've lost access to the source code. Luckily, we do have a server backup file.

Could anyone kindly suggest a method for deploying this code on the new domain?

Thank you in advance.

Laravel 5.4 Web App Migration Help Required.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/uSpwMvy
via IFTTT

Authentification failed [closed]

I develop in Laravel and I need to do authentication with two roles but it does not work : if the role of the user is a technician or engineer the system must go to the homet.blade.php page ,

here the code is what the syntax is just :

@if (Auth::user()->role == "Technician" xor Auth::user()->role == "Engineer" )

window.location = "/homet";

@endif

I tried to insert the logical operation "xor" but it does not work



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/ekltwMT
via IFTTT