Skip to content
Advertisement

Tag: laravel

laravel ignore return redirect()

hi guys i’m trying to redirect user to bank but laravel is ignoring my return redirect in here i’m calling pay() in zarinpal class : at the end of redirectToBank() user must redirect to bank but it is ignoring redirect and is returning $order in cheackout() Answer I think that the redirect returns a redirect object. And this object needs

str_replace() is not working in aws server returning empty string but working on cpanel and locally

I am developing a laravel ride sharing applicaiton and for the settings data I used a config files. To change any value usign file file_get_contents after that with str_replace and file_put_contents for updating the value. here is some code example: But the $change_content doesn’t return any value in the AWS server NOTE: This is working in my local machine also

join a single table twice in join query

I have 3 tables users and meeting table and user_role. In user table I have user_name and user_role fields and in meeting table I have the column meeting_id assigned_username and created_by_user_name fields and In user_roles table have id and role . I want to get the assigned_user_name’s user_role and created_by_user_name’s user_role in single query. I have tried as but getting

I can’t get JWT token in Laravel

I am creating an API in Laravel 8 (PHP 7.4) and I wanted to secure it. The choice fell on tymon / jwt-auth. I follow the documentation from the website: https://jwt-auth.readthedocs.io/en/develop/quick-start/ Everything works fine here. However, later when I create a route to login and want to get the token using auth()->attempt(), I have the following error: Undefined method ‘attempt’.

Advertisement