Questions tagged [laravel-views]

69 questions
0
votes
1 answer

laravel-how to fetch Specified object in view?

I'm passing data to the view and I'm trying to get a Certain key from a nested object without using foreach. Help me to fetch the value of 'original' and '300' from images. { "current_page": 1, "data": [ { "id": 44, …
MAHDI
  • 1
  • 1
  • 2
0
votes
2 answers

Automatically Load/Show Laravel View File

I am thinking of any techniques of autoloading the view files according to url. For example: public function addProducts() { return view('admin.addProducts'); } public function editProducts() { return view('admin.editProducts'); } public…
Delowar Hossain
  • 375
  • 1
  • 3
  • 19
0
votes
5 answers

How to display user image in Navigation Bar that is part of master page in laravel?

I want to display user's image in menu bar that is part of master page. master.blade.php
0
votes
1 answer

Laravel - set session from form input

I cannot display session value in my view. I only want to display it to see if it's correctly set inside the controller. Is it correctly set in controller? How can I check? I have this in view:
Victordb
  • 519
  • 1
  • 11
  • 25
0
votes
3 answers

How to retrieve items from the cache in view in Laravel?

I've stored some data in Laravel 5.5 cache in Service Provider as you can see in following: class DataServiceProvider extends ServiceProvider { public function boot() { $user = Cache::rememberForever('user', function () { …
SoheilYou
  • 907
  • 5
  • 23
  • 43
0
votes
1 answer

Laravel - Share data with all views when the data is available

I'm writing a web app using Laravel 5.6. I need a list of all the connections the current session user have, in all the views. I tried something like this View::share('connections', Connection::getList(Auth::id())) I put this code inside the boot…
Tushar Bhatt
  • 15
  • 1
  • 11
0
votes
1 answer

Show Dynamic image data to the img html element - Laravel, Collective

I am dealing with 2 variables here. 1st being $xyz which contains all the values I would like to bind to the form and 2nd being $fields which contains all the input fields. I am looping through $fields->field_name to show all the form fields from…
0
votes
1 answer

defining routing in laravel

I have a titles index page (displays many titles via foreach loop) and a single title show page. On the single title show page I want to be able to show a person's info page, ie. actors page. I really have no idea how to make that happen as I'm new…
Mapalo PS
  • 1
  • 2
0
votes
3 answers

laravel pass paginate collection to view

I want to paginate all departments with corresponding companies on my view. Therfore I created the corresponding models and to select only the needed fields i created a collection. In my Controller i create an Instance of this Collection and want to…
0
votes
1 answer

The @isset directive is not been rendered by Laravel 5.4

I'm developing a blade view on Laravel 5.4 which tests if a variable is set. If it is not set, the blade must present a little piece of html code placed into it. The problem is Laravel ignores or doesn't recognize the @isset directive rendering the…
0
votes
2 answers

Controller to return view using variable Laravel

I have this variable that should be in my url but includes the "." (dot). Sorry I am still noob in laravel. Expected Result is localhost/myProject/public/var_name Eror says View [.sampleVariable] not found. my line is return…
Ralph
  • 193
  • 1
  • 4
  • 12
0
votes
2 answers

laravel: how can I output the filepath of a video file

When I uploaded some videos via a form it saved my videos on the public folder but in the view I can't access them. my view (tyring to output the filepath) {{ $media->video_ogg}} {{ $media->video_mp4}}…
Papouche Guinslyzinho
  • 5,277
  • 14
  • 58
  • 101
0
votes
1 answer

laravel package / service provider view refactor, how to fallback to a view location definition in case the view is not found?

I had to do this: Take a created laravel app, a way to create something like 2 apps that share a core? so i created a package of the existing app. Now all views need to be prefixed with something like myappcore:: now I can do that but it will take…
Toskan
  • 13,911
  • 14
  • 95
  • 185
0
votes
4 answers

laravel 5.4 undefined variable in view

I'm kind of new to laravel and trying to pull data from a database but keep hitting an error page saying there's an undefined variable within the view. I'm supposing there's something I'm doing wrong (or not doing) within the controller. So I have…
0
votes
1 answer

How to use a single value from foreach inside another foreach tag which is inside the same foreach

In my view page i have used the following loop: @foreach ($type as $ingtype)

{{$ingtype->Ing_type}}

@foreach (${{$ingtype->Ing_type}} as $ing)
Atul Stha
  • 1,404
  • 8
  • 23
  • 46