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
Tag: laravel
Is there any way to optimize the query while working with 2mil+ rows database table
I am working on Laravel query that shall count the latest month data and also group by week, for the last 3 months. I have tried to fix that in a few ways but still it’s exceeds my memory limit and load very slow. Bellow is the current code that I am using to get the final results – but
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
Trying to get property ‘name’ of non-object laravel 8 and livewire
I am getting the error when I try to edit products in my eCommerce project. I can not find where i doing the mistake. when i am trying to edit product it give me the error. i am begginer to laravel 8. i can not find where to look for as it shows me the declared variables list. my class
Is there a way to make a Laravel 7 polymorphic relationship work with Laravel 8?
I have a Laravel 7 app with a polymorphic relationship saved in the database. I also have another Laravel 8 app querying the same database. The problem is Laravel 7 saves the morph type as “AppModel” while Laravel 8 saves as ‘AppModelsModel’. So when I’m querying the relationship from my Laravel 8 app, it returns null. Anyone know how to
Laravel – Too slow sitemap creation (Apache and Node.js installed on the same server)
I am running two Angular2+ projects and a Laravel API on my server together. The first angular project is a public website for users (SSR enabled), the second angular project is Admin Panel (SSR not enabled), these two projects run on Laravel API. I have a strange problem with sitemap creation. I am using this library for sitemap creation and
Should I increase the PHP memory_limit to match my VM memory_limit?
I have a doubt if I should do this or not. I have a VM with 4 GBs RAM from Linode. I want to optimize what I paid for and increase the default value of memory_limit in php.ini to allow my Laravel application to take much more than the default value. Will this help my Laravel application load faster? Is
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
Laravel collection – Group by months in a year and show the missing months from table with a count of 0
I am trying to create a collection in laravel which groups the current year into months with a supplied count. So far so good. The thing is, which indeed is obvious, collection is not showing the months that doesn’t exist in the table. By using the following code I get an output as follows The collection output I am trying
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’.