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 …
Tag: laravel-5.8
Attempt to assign property of non-object when updating the existing the record
I want to update some records from my table and if user has uploaded a picture, I need to upload it and update the seller_certificate_card as well. Here is my code: And the seller_certificate_card at the table has this structure: seller_certificate_card varchar(255) But I get this error: Attempt to assign pro…
Laravel Rate Limiter Limits Access Wrongly After Only One Attempt
I’m working with Laravel 5.8 and I wanted to set up a Rate Limiter that limits accessing to route by per minute and also IP address. So I added this to RouteServiceProvider.php: And then applied it to Route: So it should be limiting access after 500 attempts or 20 attempts from the same IP address. But …
“Syntax error or access violation” error while trying to join a table column multiple times
I want to join 3 tables named members, students and baseinfos. And baseinfos holds some id as bas_id and name of it is stored in bas_value: And this is my code: But this is wrong and shows me this error: Note that I can not say this: Because degree.bas_value will overwrites gender.bas_value! So how can I join…
Session put does not seem to be working properly
I’m working with Laravel 5.8 and I wanted to make sure that users can submit a form only every 2 hours (as long as a session is alive). So I tried this at the Controller: So by this, everytime a user submits a new request, session request_has_been_sent must be set. Therefore at the next time user submit…
Console.log does not show result based on variable value
I’m using Laravel 5.8 and in this project, I wanted to show some results in Javascript based on the variable which is sent to View. So at the Controller, I have added this: Then at the view: So basically, if title does not have any value, it should be showing 1 at the Console bar, otherwise 2 must be ap…
use multiple Trait in laravel Controller
problem in use multiple Trait in Controller Traits in CRController error log exec command… composer dump-autoload composer dump-autoload -o php artisan config:clear php artisan view:clear php artisan route:clear php artisan cache:clear not wotking! Answer This is called Conflict Resolution. In a simple …
Value Old Does Not Work Out When The Form Refreshes
I’m working with Laravel 5.8 and I wanted to add value old() so that when user fills out form and the form gets refreshes (if any error occured), the old value appears as value of input: But now the problem is, it does not show the Old value of user however the form input is filled once. So how to
Laravel 5.8: Weird Error Trying to get property ‘created_at’ of non-object
I’m using Laravel 5.8 to develop my project and in this project, I have a OneToMany relationship between Member Model & Student Model like this: Student.php: Member.php: Then at the Controller, I added this: Now at the view I want to get created_at timestamp like this: $customs->find($student->…
How to find data based on Many To Many relationship in Laravel 5.8
I have a Many To Many relationship between User Model & Wallet Model: Wallet.php: And User.php: And I have these three tables related to Wallets: Table wallets: Table user_wallet: And table user_wallet_transactions: Now I need to show wallets of a single user. So at the users.index Blade, I added this: An…