You are inserting into the dB or what are you trying to do?

|
N_Ibrokhim 2022-08-28 20:06:35
faissaloux 2022-08-28 20:05:29
Replace update() by save()

I tried, didn’t work

Denno_IT 2022-08-28 20:07:39
N_Ibrokhim 2022-08-28 20:00:22

You are inserting into the dB or what are you trying to do?

faissaloux 2022-08-28 20:08:20
N_Ibrokhim 2022-08-28 20:06:35
I tried, didn’t work

What shows u!

N_Ibrokhim 2022-08-28 20:09:12
faissaloux 2022-08-28 20:08:20
What shows u!

laravel_discuss-135948.jpg

saikumar s 2022-08-28 20:09:19
Main::find(1)

Then $word->save()

N_Ibrokhim 2022-08-28 20:09:37
Denno_IT 2022-08-28 20:07:39
You are inserting into the dB or what are you trying to do?

updating

faissaloux 2022-08-28 20:10:11
U need to use Main::find(1)
akhmatkhonov 2022-08-28 20:10:16
N_Ibrokhim 2022-08-28 20:00:22

Maybe your $request is undefined in your method

saikumar s 2022-08-28 20:10:30
faissaloux 2022-08-28 20:10:11
U need to use Main::find(1)

Yes

Denno_IT 2022-08-28 20:10:32
N_Ibrokhim 2022-08-28 20:09:37
updating

I think if it’s updating you need to use find then pass the I’d.. This I’d should be from the insert controller

Denno_IT 2022-08-28 20:10:42
Or the function
Denno_IT 2022-08-28 20:11:29
Like ($word->id)
Denno_IT 2022-08-28 20:11:57
If you pass id inside the controller then you need to use the I’d in the request.. As it is used in the – – resource controllers
N_Ibrokhim 2022-08-28 20:14:26
Denno_IT 2022-08-28 20:11:57
If you pass id inside the controller then you need to use the I’d in the request.. As it is used in the – – resource controllers

I didnt do this because I will only have one record. I thought it would not be needed

faissaloux 2022-08-28 20:15:10
Use find() instead of whereId()
faissaloux 2022-08-28 20:15:20
Then save()
Denno_IT 2022-08-28 20:15:41
faissaloux 2022-08-28 20:15:10
Use find() instead of whereId()

Sure..

Denno_IT 2022-08-28 20:16:20
N_Ibrokhim 2022-08-28 20:14:26
I didnt do this because I will only have one record. I thought it would not be needed

No..you I use it all times… And it works for me very well

Denno_IT 2022-08-28 20:17:48
You have to stick to one method anyway.. Either use the post and get or use the others.. Incase you use both you will aways be confused.. I can just tell you to stick to one only.. Use the find()… Its simple and used for post.. If only you want to just concentrate in the two server request methods…
❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 20:58:51
Below my code for multi auth please help me how to solve this error
❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 20:59:14
laravel_discuss-135965.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 20:59:28
My code is below
❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:13
laravel_discuss-135968.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:13
laravel_discuss-135967.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:14
laravel_discuss-135969.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:15
laravel_discuss-135971.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:15
laravel_discuss-135970.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:16
laravel_discuss-135973.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:16
laravel_discuss-135972.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:22
laravel_discuss-135974.jpg

❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:00:34
My model controller route is above
❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:01:38
Iam redirect after login homescreen (‘/) with role or middleware
❤️ ᴍɪɢʜᴛⓨ 🌹 2022-08-28 21:02:16
Please help me how to redirect homescreen route (‘/’)
being_shaif 2022-08-28 21:20:19
I want freelancing work in Laravel 😅
HyipMakerTeamzone 2022-08-28 21:30:02
laravel_discuss-135979.jpg
public function SubCategory()
{
$subcategory = DB::table(‘subcategories’)
->join(‘categories’,’subcategories.category_id’,’categories.id’)
->select(‘subcategories.*’,’categories.category_en’)
->orderBy(‘id’,’desc’)
->paginate(5, [‘id’]);
return view(‘backend.subcategory.subcategory’,compact(‘subcategory’));
}// end method
|