Does fillable have anything to do with querying the record?

|
DcodeArena 2020-07-26 11:11:34
2020-07-26 10:18:28
Any one here who can help me to upload my laravel project in cpenal

Inbox

2020-07-26 11:11:34
natghi2010 2020-07-25 23:38:24
the one you commented out

laravel_discuss-46182.jpg
Dosen’t work

2020-07-26 11:11:35
natghi2010 2020-07-25 23:38:24
the one you commented out

laravel_discuss-46183.jpg

2020-07-26 11:30:42
laravel_discuss-46184.jpg

Roham0010 2020-07-26 12:19:28
It’s obvious you mysql user “User” don’t have access to your database maybe it’s permission problem or maybe password problem
ElyorDjalalov 2020-07-26 12:20:48
password problem
ElyorDjalalov 2020-07-26 12:21:10
I have had this issue recently
ElyorDjalalov 2020-07-26 12:21:56
Make sure that passwords are the same to your database
ElyorDjalalov 2020-07-26 12:22:20
your log says it is
ElyorDjalalov 2020-07-26 12:22:46
just a min
ElyorDjalalov 2020-07-26 12:22:57
I will just try to screenshot
2020-07-26 12:24:01
https://youtu.be/_d9VxiKoj34

qr code kaise banate hain ।। kaise banaye qr code #QRcodeYouTube
hello dosto aaj aapko me bataunga ki aap apne mobile phone me qr code generate kaisr kar sakte he . to dekhte rahie hamare video ko end tak

qr code kaise banate hain ।। kaise banaye qr code

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain
#qr code kaise banate hai mobile se
#barcode kaise banate hain
#qrcode
#qrcodegenerete

#qr code kaise banate hain…

Roham0010 2020-07-26 12:24:02
I thing that you don’t have a MySQL user named “User” do you?
Roham0010 2020-07-26 12:25:10
go to phpmyadmin if you have access then from home tabs select User accounts to see if you have “User” user
ElyorDjalalov 2020-07-26 12:31:34
laravel_discuss-46213.jpg
I think this makes sense
ElyorDjalalov 2020-07-26 12:35:09
ok
Billa_Bongg 2020-07-26 13:02:43
This issue might arise if you import an sql script that had definer set to some values…..
Billa_Bongg 2020-07-26 13:05:48
It depends on the sql client you are using…In Navicat there’s a definer on the query…..
Billa_Bongg 2020-07-26 13:06:18
Go to the plugins table and check if there’s a definer on it
Roham0010 2020-07-26 13:06:43
Rename cache files manually to see if it works..
Also search case sensitively for “User” keyword in your config folder or other folders to see where you used User as mysql user..
ktmsulaim 2020-07-26 13:55:48
Hi, pls help!!
Model can’t be retrieved by slug

Event::where(‘slug’, $slug)->get()

returns empty array. But slug is correct

Siberfx 2020-07-26 14:08:02
check your model, if you have the slug in fillable variable
natghi2010 2020-07-26 14:13:34
Siberfx 2020-07-26 14:08:02
check your model, if you have the slug in fillable variable

does fillable have anything to do with querying the record?

natghi2010 2020-07-26 14:14:03
or is the problem
natghi2010 2020-07-26 14:14:14
at insertion?
Siberfx 2020-07-26 14:15:45
Slug is correct he says
Siberfx 2020-07-26 14:15:55
So its not insert issue
2020-07-26 15:22:46
$query = DB::table(table);
$item1 = $query->where(key, val);
$item2 = $query->where(key, val);

When I try $query->toSql(), it shows that where is being repeated twice. One of them is the condition of $item1 and the other one $item2

SELECT * FROM table WHERE key=? AND WHERE key=val

When I comment $item1 or $item2 it works fine.

Why? How can I solve it?!

Siberfx 2020-07-26 15:25:07
Twice same where condition?
ktmsulaim 2020-07-26 15:35:05
It was wrapped in a group route which has prefix of dynamic locale. But when I try out of the group it works as expected. Thanks
ktmsulaim 2020-07-26 15:38:13
laravel_discuss-46245.jpg
screenshot
2020-07-26 15:39:32
Siberfx 2020-07-26 15:25:07
Twice same where condition?

Any idea?!

2020-07-26 15:40:19
It seems somehow Laravel chains the same query.
ktmsulaim 2020-07-26 15:43:54
Siberfx 2020-07-26 14:08:02
check your model, if you have the slug in fillable variable

Sir, CRUD operations are functioning well in admin panel. Now i’m trying to get a record by slug in frontend.

Siberfx 2020-07-26 15:45:43
ktmsulaim 2020-07-26 15:43:54
Sir, CRUD operations are functioning well in admin panel. Now i’m trying to get a record by slug in frontend.

which laravel version ?

ktmsulaim 2020-07-26 15:45:56
Siberfx 2020-07-26 15:45:43
which laravel version ?

Laravel 7

Siberfx 2020-07-26 15:46:34
Can you add ->dd() to end of your chain ?
ktmsulaim 2020-07-26 15:46:57
IlluminateDatabaseEloquentCollection {#1382 ▼
#items: []
}
ktmsulaim 2020-07-26 15:47:10
returns empty array
Siberfx 2020-07-26 15:47:16
Show me your route and the controller method
ktmsulaim 2020-07-26 15:47:49
laravel_discuss-46255.jpg
Route
ktmsulaim 2020-07-26 15:48:37
laravel_discuss-46256.jpg
Controller
Siberfx 2020-07-26 15:48:47
php artisan route:list
Siberfx 2020-07-26 15:49:39
Also dont use get
Siberfx 2020-07-26 15:49:51
firstOrFail()
ktmsulaim 2020-07-26 15:50:01
laravel_discuss-46260.jpg
Route:list
ktmsulaim 2020-07-26 15:50:12
Siberfx 2020-07-26 15:49:51
firstOrFail()

Returns null

Siberfx 2020-07-26 15:50:29
And model
Siberfx 2020-07-26 15:50:40
Also the database with record
ktmsulaim 2020-07-26 15:51:24
laravel_discuss-46264.jpg
Model
|