Hmmm you are building validation on model file?

|
khanbozkurt 2021-07-18 21:20:55
laravel_discuss-88588.jpg
i validate to request over middleware. I call middleware when create and update requests
Darjus Z 2021-07-18 21:25:48
khanbozkurt 2021-07-18 21:20:55
i validate to request over middleware. I call middleware when create and update requests

I thinking about it but if possible shorter solusion will be better

khanbozkurt 2021-07-18 21:27:03
Darjus Z 2021-07-18 21:25:48
I thinking about it but if possible shorter solusion will be better

how can i made? have you example to short solution?

Darjus Z 2021-07-18 21:28:46
As i uploaded photo before is shorter because all working except mimes sizes
khanbozkurt 2021-07-18 21:30:18
Darjus Z 2021-07-18 20:29:45

this method?

Darjus Z 2021-07-18 21:30:59
Yes im making with livewire
khanbozkurt 2021-07-18 21:33:59
hmmm you are building validation on model file?
khanbozkurt 2021-07-18 21:35:09
definitely goog idea 🙂
khanbozkurt 2021-07-18 21:37:25
ok, i’ll change my validation way. May you look after when i completed Darjus
Darjus Z 2021-07-18 21:41:34
No i make in component because its small web for upload photo only for client
Darjus Z 2021-07-18 21:44:54
Maybe later i will make as it should be 🙂 if will be bigger proect, im newbe in laravel so i dont think will you help much 😊 but shure you can send me what you done and check
khanbozkurt 2021-07-18 21:49:44
Darjus Z 2021-07-18 21:44:54
Maybe later i will make as it should be 🙂 if will be bigger proect, im newbe in laravel so i dont think will you help much 😊 but shure you can send me what you done and check

ok thank you 🙂🙏

Bhuvi100 2021-07-18 22:05:30
khanbozkurt 2021-07-18 21:20:55
i validate to request over middleware. I call middleware when create and update requests

What is your problem with doing validation inside a controller?

khanbozkurt 2021-07-18 23:35:29
i solved my issue. i will validate my requests with Request class. i will build a custom request
MariaDelinternet 2021-07-19 00:27:35
Hey, we’re looking for a workmate with PHP coding experience. Well-paid salary and professional team in Europe. Working remotely is possible.
khanbozkurt 2021-07-19 00:32:30
laravel_discuss-88609.jpg

khanbozkurt 2021-07-19 00:32:30
laravel_discuss-88608.jpg
i take this error? What is problem?
Relaxed Guy 2021-07-19 00:33:01
check the. method ur using to make a rquest
Relaxed Guy 2021-07-19 00:33:20
is it a post request
khanbozkurt 2021-07-19 00:33:38
laravel_discuss-88612.jpg
Request is true
Relaxed Guy 2021-07-19 00:33:51
can we look at your api route
khanbozkurt 2021-07-19 00:34:06
i shared
khanbozkurt 2021-07-19 00:35:51
laravel_discuss-88616.jpg
AuthorController
DesolatorMagno 2021-07-19 00:35:51
What response you get if you make a get to authors?
DesolatorMagno 2021-07-19 00:36:09
There is not the error.
DesolatorMagno 2021-07-19 00:36:33
You get the expected response when you make a get request to authors?
Relaxed Guy 2021-07-19 00:36:35
why dont use Request $request
Relaxed Guy 2021-07-19 00:37:03
he used / for the post request …
DesolatorMagno 2021-07-19 00:37:05
Because he is using a request file to manage the request.
khanbozkurt 2021-07-19 00:38:19
DesolatorMagno 2021-07-19 00:36:33
You get the expected response when you make a get request to authors?

yes i can getting with get request

DesolatorMagno 2021-07-19 00:38:48
I know you get a response, but is the correct/expected response?
khanbozkurt 2021-07-19 00:38:56
Relaxed Guy 2021-07-19 00:36:35
why dont use Request $request

i want manage my request validation

Relaxed Guy 2021-07-19 00:39:29
public function create(Request $request)
Relaxed Guy 2021-07-19 00:39:48
let me see wat u did up de?
Relaxed Guy 2021-07-19 00:39:59
AuthorPostRequest ..
|