Questions tagged as 'laravel-blade'

2
answers

Problem in a foreach

I'm using Laravel 5.3 , and when doing a foreach in the view, it does not recognize as an object, but if I print only what is in the $user variable it prints a json object %. Controller: public function getAll() { retu...
asked by 08.11.2016 / 12:17
2
answers

How do I find out the first or last Loop item in Laravel?

I have the following foreach in Laravel. @foreach($values as $value) <li>{{ $value }}</li> @endforeach I would like to add some special information when it comes to the first item in the loop. In some other template...
asked by 02.09.2016 / 16:57
2
answers

Laravel, call Action from a Controller from a View?

I have a View where in it I would like to add the link of a Controller with its Action specifies and when loading this View to Action of that Controller is triggered. Example: within a View I...
asked by 27.06.2017 / 07:01
2
answers

Laravel: View and SubViews

Does anyone know how my layouts.default can load multiple views every time they are called. For example I want to call the views of the menus and the menu.blade.php file has to receive data as well.     
asked by 28.06.2014 / 06:01
2
answers

How to use echo in a Laravel view?

I want my layout blade echo only if the $errors variable is set: @section('mensagens') <div class="container"> <div class="row"> <div class="col-md-2"></div> {{...
asked by 01.11.2016 / 14:17
1
answer

Laravel - validate input arrays and return values in case of error

I am creating form using the following code: In the create.blade.php file {!! Form::open(['route'=>'orcamentos.store']) !!} {!! Form::text('descricao', null, ['class'=>'form-control', 'autofocus']) !!} {!! Form::text('produto[]', null...
asked by 01.06.2016 / 04:09
1
answer

href blade Laravel and Vue.js

I'm doing the list of registered receivers and in each line there is an edit button, in href, I need to use the encrypt and pass the id, but this id comes from Vue.js and the blade using {{} } does not recognize the Vue.js variable, so my questi...
asked by 01.10.2017 / 17:52
2
answers

I do not understand why empty says that the variable is not empty

There is a membership module where members of a church are registered. For this register will be shown on the main page the birthday of the day in a jQuery slide. But when you do not have a birthday boy, he'll show you something else. When you d...
asked by 22.09.2017 / 17:55
2
answers

Send parameter from one route to another

I want to send a variable from one route to another, to display this variable in the view, use example: public function create(ExamRequest $request) { Exam::create( $request->all() ); $message = 'A avaliação "'.$request->input('n...
asked by 09.01.2017 / 18:35
1
answer

Why use unless in Laravel, instead of a negation in if?

I find Laravel an interesting framework. The functionality of the view is excellent, for simplifying the syntax of a foreach or if for example. But one thing I did not understand is: Why does unless ? Why use...
asked by 26.04.2016 / 22:41