Skip to content
Advertisement

Tag: laravel-5

How to access assets from resources sub folder in Laravel?

This is the javascript source in blade file. OR Both asset and URL::to doesn’t work. The actual file path is: resources -> views -> template -> js error shows 404 not found on local xampp server. its working fine in production. project is copy of production code. I would appreciate for your kind support. thanks Answer Static assets are usually

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 solution with a @foreach:

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 returns the same output but I got an error! Which is, Can

What is the difference between with, compact and array in when return view in laravel

I’m little bit confuse I want to know the difference between those three returns: return view(‘post’, [‘post’ => $post]); return view(‘post’, compact(‘post’)); return view(‘post’)->with(‘post’=>$post); So, can someone explain for me the difference in easy way. Answer Array : You may pass an array of data to views, like this : When passing information in this manner, the data should be

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 => “…

Advertisement