What type of project you r building?

|
DesolatorMagno 2021-03-25 23:23:49
$document = new Document;
$document->delete();
Do you understand what is happening here? what you show is really basic
attanqazaq 2021-03-25 23:25:25
DesolatorMagno 2021-03-25 23:23:49
$document = new Document;
$document->delete();
Do you understand what is happening here? what you show is really basic

it’s just my misjudgments

attanqazaq 2021-03-25 23:25:44
public function destroy(Document $document)
{
$document->delete();
return redirect()->back()->withSuccess(‘Категория была успешно удалена!’);
}
attanqazaq 2021-03-25 23:26:23
attanqazaq 2021-03-25 23:25:44
public function destroy(Document $document)
{
$document->delete();
return redirect()->back()->withSuccess(‘Категория была успешно удалена!’);
}

and here is the normal code itself

DesolatorMagno 2021-03-25 23:27:29
Ok.

Missing required parameter for [Route: docs.update], must be a error while creating the link, show how you did it.

attanqazaq 2021-03-25 23:27:30
everything works fine with the deletion but the data is not deleted from the database
DesolatorMagno 2021-03-25 23:28:31
Everything work fine, but it don’t delete, that’s kinda weird to say together, like
My car is working fine, but it doesn’t move or do anything at all.
attanqazaq 2021-03-25 23:28:42
DesolatorMagno 2021-03-25 23:27:29
Ok.

Missing required parameter for [Route: docs.update], must be a error while creating the link, show how you did it.

laravel_discuss-74510.jpg

DesolatorMagno 2021-03-25 23:29:00
attanqazaq 2021-03-25 23:28:42

In the view…

attanqazaq 2021-03-25 23:29:38
DesolatorMagno 2021-03-25 23:28:31
Everything work fine, but it don’t delete, that’s kinda weird to say together, like
My car is working fine, but it doesn’t move or do anything at all.

laravel_discuss-74512.jpg

DesolatorMagno 2021-03-25 23:30:04
😅 the code for the edit link
attanqazaq 2021-03-25 23:30:10
DesolatorMagno 2021-03-25 23:29:00
In the view…

laravel_discuss-74514.jpg

attanqazaq 2021-03-25 23:30:49
laravel_discuss-74515.jpg

DesolatorMagno 2021-03-25 23:31:08
Missing required parameter for [Route: docs.update] [URI: admin_panel/docs/{doc}] [Missing parameter: doc]

Read it again, it say that one parameter is missing, you can’t try things at ramdon.

attanqazaq 2021-03-25 23:31:18
laravel_discuss-74517.jpg

attanqazaq 2021-03-25 23:32:28
DesolatorMagno 2021-03-25 23:31:08
Missing required parameter for [Route: docs.update] [URI: admin_panel/docs/{doc}] [Missing parameter: doc]

Read it again, it say that one parameter is missing, you can’t try things at ramdon.

I searched but but didn’t find that missing

DesolatorMagno 2021-03-25 23:32:41
https://laravel.com/docs/8.x/routing#generating-urls-to-named-routes
DesolatorMagno 2021-03-25 23:33:07
laravel_discuss-74520.jpg

attanqazaq 2021-03-25 23:33:13
but I guess that $document->id is not passed
attanqazaq 2021-03-25 23:36:35
laravel_discuss-74522.jpg

attanqazaq 2021-03-25 23:36:45
laravel_discuss-74523.jpg

attanqazaq 2021-03-25 23:37:38
laravel_discuss-74524.jpg

DesolatorMagno 2021-03-25 23:37:48
Let’s do a simple exercise
– What parameter it say is missing?
– What parameter are you passing?
DesolatorMagno 2021-03-25 23:38:22
If you just copy and paste, you are gonna have a hard time, you need to read more carefully
attanqazaq 2021-03-25 23:39:07
DesolatorMagno 2021-03-25 23:37:48
Let’s do a simple exercise
– What parameter it say is missing?
– What parameter are you passing?

parameter: doc

attanqazaq 2021-03-25 23:40:36
laravel_discuss-74528.jpg

attanqazaq 2021-03-25 23:41:14
similar as comment
DesolatorMagno 2021-03-25 23:41:40
attanqazaq 2021-03-25 23:36:45

Did you change here what is wrong?

attanqazaq 2021-03-25 23:42:24
laravel_discuss-74531.jpg

attanqazaq 2021-03-25 23:44:21
DesolatorMagno 2021-03-25 23:41:40
Did you change here what is wrong?

yes I tried, but it doesn’t help because $new_doc – >id should pass me the id number of the database record

DesolatorMagno 2021-03-25 23:44:33
admin_panel/docs/{doc} is not the same as admin_panel/docs/{doc}/edit
amir_0787 2021-03-25 23:45:02
2021-03-25 23:19:19
What type of project you r building?

a music platform

attanqazaq 2021-03-25 23:45:58
DesolatorMagno 2021-03-25 23:44:33
admin_panel/docs/{doc} is not the same as admin_panel/docs/{doc}/edit

what should be passed for the doc parameter?

DesolatorMagno 2021-03-25 23:46:01
attanqazaq 2021-03-25 23:36:45

I am almost sure that these capture is from index, but the error say that is inside edit.blade.php

Van_Romy 2021-03-25 23:46:11
Hi You All. Hope you are alright and that you are taking care in those crazy time. I’m new to laravel but few years in web dev. I’m looking for a solution to generate n number of vouchers from x digits letters and numbers, upper and lowercase. I found this solution but doesn’t works with laralvel 8.x neither does it with 7.x ***amestsantim/voucherator*** because of dependencies. Can anyone suggest me an another approch or guide me to another solution.? Thanks.
|