Most voted "laravel-blade" questions
Blade Template Engine is part of the Laravel PHP framework. Blade allows you to use a discrete syntax to write PHP control structures and display the data. Use this tag for questions about problems with Blade syntax and usage.
Learn more…166 questions
Sort by count of
-
9
votes1
answer443
viewsIs Laravel’s Blade a programming language?
After a brief discussion of why the HTML is not a programming language, characterize that not because it is not able to perform calculations, make decisions, change information contained in some…
-
8
votes2
answers217
viewsRisk in allowing developers to upem files. Blade
I’m developing a blog platform where users submit their template and Laravel uses this template to build the blog. The user/developer will only inform where the values will be, example:…
-
8
votes1
answer10928
viewsWhat’s the difference between @Yield and @include on Laravel?
I’m learning Laravel 5.3, @yield and @include seem very much the same to me, the only difference I know is that @include injects the variables of father and may also include other variables. What’s…
-
7
votes2
answers2551
viewsProblem with @extends in view on Laravel.
I have a problem with @extends('layouts.template'). Only my view that is as index that does not show the page, instead shows me only this @extends('layouts.template') on the page. What could be?…
-
7
votes1
answer9661
viewshtmlspecialchars() expects Parameter 1 to be string, Object Given
I’m trying to make a button select in the Blade with @foreach to get the list of all Mysql databases. Only the @foreach works, I can get the values, but I’m not getting to put the bases inside a…
-
5
votes2
answers228
viewsWhat’s wrong? BD + Laravel
I have a form in Lade taking the values of the database. In it I have a field date not required to be filled in. When you enter an empty date the results screen displays the date "01/01/1970". How…
-
4
votes2
answers3535
viewsDisplaying authenticated user data in the view
I have a problem that I believe is quite simple... I need to display the username logged in to my views... how do I do that? this is one of the views @extends('layouts.template') @section('body')…
-
4
votes2
answers357
viewsPortable blade and performance
In the Laravel, we usually use the Blade in order to write a view. Example: @unless($variable) <p>Nenhum dado encontrado</p> @else @foreach($variable as $v) <p>{{ $v }} </p>…
-
4
votes3
answers145
viewsBlade default value Laravel 5.2
I have the following code <strong class="primary-font">Complemento</strong> <p>{{ $produto->complemento or 'Esta produto não tem complemento' }}</p> I need that if the…
laravel laravel-eloquent laravel-blade laravel-5.2asked 8 years, 3 months ago Danilo Tiago Thai Santos 409 -
4
votes1
answer58
viewsField code in option value attribute
I have a table CategoriaCNH with the following fields CodCategoriaCNH and Descricao. and I have this piece of code html: <select name="categoriaCnh"> <option value="" disabled…
-
4
votes2
answers299
viewsSelect Laravel Entering Next Record Alone
Good evening, I have a project in Laravel and I’m having the following difficulty: I have a controller that retrieves data from my database, has a variable that receives string and this string…
-
3
votes2
answers1433
viewsLaravel: View and Subviews
Someone knows how mine layouts.default can load multiple views whenever they are called. For example I want to call views from menus and the file menu.blade.php has to receive data too.…
-
3
votes1
answer468
viewsWhy use unless in Laravel instead of a no if denial?
I think the Laravel an interesting framework. The features of the view are excellent, regarding the simplification of the syntax of a foreach or iffor example. But still one thing I don’t understand…
-
3
votes2
answers412
viewsHow to find out what is the first or last item of the Loop in Laravel?
I got the following foreach in Laravel. @foreach($values as $value) <li>{{ $value }}</li> @endforeach I would like to add a special information when it comes to the first loop item. In…
-
3
votes1
answer3702
viewsLaravel - 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',…
-
3
votes4
answers8807
viewsHow to convert a date variable to the Brazilian format within a view?
Within a index.blade.php have a variable: <td>{{$ordemjoin->dataplanejamento}}</td> In the listing comes the date in the format English. How do I put in the format Brazilian?…
-
3
votes2
answers674
viewsHow to use "echo" in an Laravel view?
I’m hoping that in mine layout blade echo only if the variable $errors is defined: @section('mensagens') <div class="container"> <div class="row"> <div…
-
3
votes2
answers315
viewsProblem in a foreach
I’m using Laravel 5.3, and by making a foreach in the view, it does not recognize as an object, but if I print only what is in the variable $user it prints an object json. Controller: public…
-
3
votes2
answers7000
viewsLaravel, call Action from a Controller from a View?
I have a View where inside it I would like to add the link of a Controller with your Action specifies and when loading this View to Action that Controller be triggered. Example: within a View I have…
-
3
votes2
answers1007
viewsBlade and Angular JS Incompatibility in Laravel 5
I’m having trouble using Angularjs along with Laravel’s Blade. After researching this site myself, I discovered that to resolve the conflict with Laravel the latest method is using the @{{}} in the…
-
3
votes1
answer2086
viewsHow to create functions available globally in the Standard?
I would like to create functions that are globally available to reuse the code. What would be the best way to do this, in the Standard... The flow I need would be like this.: I’ll get a requisition…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 5 years, 10 months ago Sidiclei F. Almeida 307 -
3
votes1
answer263
viewshref Laravel and Vue.js
I am doing the list of registered phonesetters and in each line there is an edit button, in href, I need to use Encrypt and pass id, but this id comes from Vue.js and Blade with the use of {{ }}…
-
3
votes2
answers93
viewsLaravel 6 escaping html Blade template
I am displaying news registered in the database using Windows and Blade template, only that html is being escaped, I have tried several ways but I can not solve. My controller returning query result…
-
2
votes1
answer2778
viewsCSS Blade Laravel
I’m starting now with Laravel 5.1, I was left with a question regarding Lade. For example, I want to pass several CSS or JS files from the page in question using Blade notation. My main file looks…
-
2
votes2
answers1244
viewsHow to work with scripts and style sheets in Laravel 5.1
I’m new to Laravel 5.1 (actually any Laravel) and I’m having a hard time understanding how to work with style sheets and simple scripts. On several sites, I see that I need to add an element to my…
-
2
votes1
answer1880
viewsHow to pass data searched by a view back to the view itself
I need to search a database through a view (Laravel Blade). The data obtained, stored in an array, need to display on the page called the database. I am not succeeding in returning the array with…
-
2
votes2
answers5344
viewsIs it possible to capture the current url in the Blade view?
I would like to capture the example url, /user/** (everything that starts with /user), I am using Laravel and Blade, using Request::url() I get localhost:8000 but I need something that can capture…
-
2
votes1
answer360
viewsCodeigniter with Blade, huh?
I’m starting to study CI and how I used a little Laravel to facilitate was trying to put the Blade, follow this tutorial. I followed the scratch the tutorial, but returns these mistakes: How to…
-
2
votes2
answers247
viewsSend 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 =…
-
2
votes1
answer475
viewsAdvanced search in Laravel 5
I’m starting to Laravel 5 and as an apprenticeship I am creating a simple employee registration. What I need is to recover from the bank a relationship of employees with exams based on search…
-
2
votes3
answers2508
viewsHow to take a variable that is in the controller and put inside a view (Adjustable)
I’m messing with Lockable and from there came the following doubt. I need to take a variable that is in the controller and put inside a view. In case I am sending an email with data contained in a…
-
2
votes1
answer298
viewsHow to use Bootstrap shortcuts in Vscode on. Blade files?
There is an extension called Bootstrap 3 Snippets, but it only executes snippets in HTML files. How to make it work in other extensions files?
-
2
votes1
answer254
viewsWhat convention is used to organize Views of Laravel?
I would like to know how to organize the views in Laravel, in which directory it is best to leave the includes, templates and main views. Also what is better to put in includes (navbar? layouts?…
-
2
votes1
answer49
viewsForm value does not return in the Collective
The form in the edção part, does not show the value coming from the database. All other form fields are returning the value taken in the database. See how I’m doing: <div class="col-md-3"> {!!…
-
2
votes2
answers1212
viewsHow to pass parameters to the Resource controller directly from the View with Helper url()
I have the following route on my Laravel app (v5.5): Route::resource('tags', 'Painel\TagsController'); In accordance with documentation official, this gives me a route with action Edit, verb GET and…
-
2
votes2
answers1485
viewsI don’t understand why Empty says the variable is not empty
There is a module of Members, where members of a church are registered. By this registration will be shown on the main page the day’s birthday on a jQuery slide. But when he doesn’t have a birthday…
-
2
votes1
answer63
viewsHow to recover old values from select inputs?
Follow the code of the Lade: <select name="tipo_id" class="form-control col-md-3 col-xs-12"> <option value=""></option> @foreach ($tipos as $tipo ) <option name="tipo_id"…
-
2
votes1
answer182
viewsPass information between two PHP pages
good afternoon! I’m having the following problem: I have a page named php locality which has the fields "name" and "city". In the name field, I enter the name of the locality, as for example,…
-
2
votes1
answer719
viewsRoute and form in Laravel
I have a route Route::get('/','WebController@index'); I have a controller public function index() { $cars = Cars::table('cars')->get(); return view('web::index')->with('cars', $cars); } And in…
-
2
votes1
answer141
viewsCreate Groups and Group Items Within Them
I have the following problem, I have a table with items and I need to create groups and name each item to its own group. I have already distributed them by categories, which in this case I call…
-
2
votes2
answers155
viewsError printing Styles and scripts in Blade templates?
I have a CMS that is using Elementor to generate pages dynamically, this saves my html css and script in the database. I had a problem with the tag issue <style> and <script> because…
-
2
votes1
answer58
viewsI can’t get into the foreach of a Lade at Laravel 5.7
I’ve got a little problem I haven’t figured out yet, I’ve got a View and I can’t get into foreach of the same, follows the View: <div class="form-group"> {!! csrf_field() !!} <!--{{…
-
2
votes1
answer606
viewsHow to update an image to the database with Laravel?
I managed to upload the photos in the database, but I can’t update these photos, when it is updated it deletes the image from the database but does not use the new. I kind of tried to copy the code…
-
2
votes2
answers595
viewsSelect2 does not work in adminLte + Laravel 5.8
I added a Select2 on the page, but it does not load at all. Someone has already gone through this? I implemented it like this: Page: cadastrar.blade.php <div class="box-body"> <div…
-
1
votes1
answer558
viewsHow do I translate to en-BR?
I have a form with following code: {{ Form::selectMonth('month') }} this returns me the months in English, how do I translate his return to Portuguese?
-
1
votes0
answers105
viewsProblems in displaying an image with the marked name in the folder
Folks I am updating a project of a client that was originally made in Vb.net and am moving to Laravel 5.1. Ta all right only one problem with the display of certain images that has in the folder…
-
1
votes2
answers601
viewsIs there an Laravel Blade Statement Tag (instead of just printing)?
I was wondering if there’s any way to create expressions with Blade’s tags Laravel. I mean, the same way we use {{ $valor }} to be able to print something, it would be possible to use the Blade…
-
1
votes1
answer166
viewsHow to escape a key/braces on Blade?
In Blade, the key (or key) characters are intended to add the purpose of printing the content. It is complicated to a echo. But I was wondering if I really needed to display a piece of content,…
-
1
votes0
answers374
viewsLaravel Checkbox Recording/Editing 5.2
Hello, I’m developing a Course Registration in Laravel 5.2. I created CRUD perfectly, it creates, edits and deletes everything right, but in this register has 3 items that are of type CHECKBOX, I…
-
1
votes1
answer1707
viewsHow to solve css loading problem and js Ready to work?
When I run my local application, the styles and js are loaded normally. The css and js are in public/css and public/js. In production they are not loaded, below the production . htaccess:…