Skip to content

Tag: laravel-5

Saving selected option after validation in Laravel

I need help with saving a selected option after validation fails. Here is main.blade.php Controller looks like: I tried this, but it always returns only the last option: Answer If I understood you correctly you want to keep the previously selected option selected when the validation fails. Less repetitive sol…

Can’t understand a logic of Object And Array in php

If I write this line on routes/web.php file It outputs this: That’s cool, but my question is since app()[‘config’] returns an object so how this [“auth.guards.web”]works? Even there is no index with that name! Outside of Laravel I tried to write a class named Test so that it retu…

how to do not update value on update function?

i want this code should not be run if user call upate route code i am using a same fucntion to update or store order but on update i donot want to run above code i know it is very simple but i am a student and learning help me here it is controller function first user create order the

get correct data from array

i am trying to decode array. this is my array array:4 [▼ “_token” => “tgPAddbrf3hI5tBIQIGyFYe9Y5RpwCj3rpZG5uVf” “resident_id” => array:4 [▼ 117 => “…