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
-
1
votes0
answers38
viewsProblem deploying Larable application to Heroku
I’m having trouble deploying to Heroku with a portable application, Heroku is not seeing my extended pages .blade.php. For example: index.blade.php But if I change to index.php He sees, someone has…
-
1
votes1
answer81
viewsHow do I send email via E-mail?
I have the following routine implemented in Laravel $prestadores = \App\Prestador::all(); Mail::send('emails.listaprestadores',['prestadores' => $prestadores], function($message) use…
-
1
votes1
answer332
viewsDiscovering last vector item in the foreach?
I need to know what is the last item of the vector so that when it is the last one does not add a comma: Example: SEM SABER QUAL É O ULTIMO ITEM 1,2,3,4,5, SABENDO QUAL É A ULTIMA VIRGULA 1,2,3,4,5…
-
1
votes1
answer86
viewsCheckbox value is null, Column 'situation' cannot be null
I have a field $table->enum('situacao', ['ativo', 'exonerado']);. I created a checkbox to register, but it returns the following error: 1048 Column 'situation' cannot be null. How can I solve?…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 11 months ago Jonathan Silva Gomes 21 -
1
votes3
answers6930
viewsAsset Help (Laravel Blade)
all right? I’m working on a project with the Laravel framework. In my project I can call a js file, but it doesn’t work. <script src="{{asset('js/formCurriculo.js')}}" type="text/javascript"…
-
1
votes2
answers374
viewsChange table color on Laravel Blade
Hello. I want to change the background of a table according to the type in DB. I am using Laravel 5.5. Can you help me?
-
1
votes1
answer728
viewsDynamically add form fields in Laravel
I have a company registration form, within this register, the company can have 'n' certificates. These certificates should be added to the form as required. How can I do this in Laravel? I’ve tried…
-
1
votes1
answer250
viewsHow do I mount a select with two fields using colletivehtml in 5.5?
Good afternoon. I use Laravel 5.5 and for forms I use laravelcollective. I mount a select this way: $locals = Local::get()->pluck('codigolocal', 'id'); and the result is a select with the value =…
-
1
votes1
answer102
viewsThe images do not appear in the Mail inbox. Laravel 5.4
There is a contact form where the user sends a message to the system and the system automatically sends a message thanking his contact and along with the message I send the most viewed articles.…
-
1
votes1
answer247
viewsHow to check if there is an error in the Laravel Blade with the @error tag Laravel 5.8.13?
Well in Laravel 5.8.13 there was an update in which instead of using: @if ($errors->has('email')) <span>{{ $errors->first('email') }}</span> @endif can be used: @error('email')…
-
1
votes2
answers501
viewsI cannot use the foreach with object twice in the same view in the Laravel
I have a big problem that I can’t solve because I’m still a beginner in Laravel. The problem is I’m developing a web application and I need to list the cities object in two different select, but…
-
1
votes0
answers510
viewsHow to pass a list of the child component to the parent component with Vue and Blade php
I have a problem, I need to access the list I create in the component selectprodutos and it persists, but the sending is made of another Component called formulario. They shall be arranged in the…
-
1
votes1
answer42
viewsList 4 bank tables and account
Hello I have 4 tables: Employees, Companies, Salaries and Discounts. I would like to present a kind of Holerite. My initial idea was to bring all the information together and treat the view as…
-
1
votes1
answer106
viewsLaravel - Doubt about @foreach?
I have the following code: @foreach($listaProdutos as $key => $listaProduto) @if(...) ... @endif @endforeach Is there any command or way to jump to the next record of $listaProduto if the…
-
1
votes2
answers41
viewsDo not display variable value in the Laravel view
@foreach ($respostas as $resposta) @if($reclamacao->id == $resposta->reclamacao_id) <td>{{$resposta->resposta}}</td> {{$i++}} @endif @endforeach When I run this code snippet,…
-
1
votes0
answers89
viewsLaravel 5.5 Array Diff with bug?
I am developing in Laravel 5.5 and Php 7.1.9 and came across the following problem: I have the following Checkboxes screen and when marking any of the fields, the arraydiff of Laravel insists on…
-
1
votes0
answers34
viewsRadio Button back with old value
Hello! I have the following code: <div class="resposta"> <label class="radio-inline" style="padding-right: 20px;"> <input type="radio" name="1" value="S" {{ old('resposta1') == "S" ?…
-
1
votes1
answer247
viewsHow to include files in a View based on the Laravel Route?
I created a view inicio.blade.php where I put all the code that repeats on all pages and created other views that extend this view. I created the routes for the views by setting a name for them this…
-
1
votes1
answer136
viewsRedirect fault Laravel
Expensive, Can you help me with this portable redirect? I created a method where it re-evaluates the data and redirects, on the other hand when redirecting I get the Route error…
laravel laravel-5 laravel-eloquent laravel-blade redirectasked 6 years, 2 months ago Ronaldo Adriano 61 -
1
votes1
answer218
viewsJquery Clear array when making new request
In the view I have a input select which event onchange I run a call on ajax for a given route that searches all items of a Model. <select required onchange="getQuestions()"…
-
1
votes1
answer277
viewsFilter a Select2 by selecting an ion in another
I have a field of type Select2 that is bringing me all the customers of a database. As I do, when selecting a client, in another Lect2 appear only contracts of the selected customer, I can not think…
-
1
votes0
answers251
viewsPOST form button does not work on Laravel 6
I am trying to send the data of a Login form by the POST method, however it is not going at all, nothing appears error. Just follow my code Form <form class="form-group"> {!!…
-
1
votes1
answer109
viewsResponsive Sidebar according to information
I’m not being able to make my menu responsive, I mean, in case I put a lot of information in the center of the container it breaks, I’d like this menu to extend or something similar to that... How…
-
1
votes1
answer103
viewsHow to print variable component in Laravel 7?
I have a $user variable in my Controller. So: public function index() { $userBiografia = "Biografia do Usuário"; return view('user.index', compact('userBiografia')); } I can print it peacefully in…
-
1
votes2
answers400
viewsFiles . css should be in the /public or /Resources folder?
I wonder why Laravel 8 is built with the folder /css inside /resources and not within /public, as set out in documentation? Call from the css file Directory of the css file outworking <link…
-
1
votes0
answers27
viewsConfirm deletion with Sweet alert2 and Laravel 7?
I have a button: <button class="btn-floating red btn-small" data-id="{{ $tag->id }}" data-action="{{url("/admin/tags/{$tag->id}") }}" onclick="deleteConfirmation({{$tag->id}})"> <i…
-
1
votes2
answers21
viewsLaravel , how to display image through class
How do I display an image through my css condigo? is that the theme I use the images as for example: the banners are displayed through the class in style.css , below is what would be done but do not…
-
1
votes1
answer376
viewsTrying to get Property of non-object error while trying to access the Blade view in the Laravel
I am trying after a foreach to access the variable with the object array in the Slide but it displays the Trying to get Property of non-object error. I’ve tried with the "firt" but it only takes the…
-
1
votes1
answer212
viewsBy select value in a PHP variable: LARAVEL BLADE
I’m trying to get the value of select "Categories" and put in the variable "$article" using Laravel’s Slides, but I’m not finding how to do this. Someone can give me a light? <?php $categories =…
-
0
votes1
answer532
viewsDefault field to select in Illuminate/html
I have a problem and I have already searched the internet for the solution. Unsuccessful! I have a form and inside it, a select filled automatically: {!! Form::select('categoria_id', $categorias,…
-
0
votes1
answer906
viewsHow to escape a javascript variable to the Laravel Slide?
Hello, I have this javascript function that receives a parameter: function teste(id){ document.getElementById("campo1").innerHTML = id; document.getElementById("campo2").innerHTML =…
-
0
votes2
answers222
viewsHow to include values in the same Section without overwriting the previous one?
I have a view which includes another view . I want these same views to include a javascript in view main call javascripts. Thus: #layout.blade.php <head>@yield('javascripts')</head>…
-
0
votes1
answer353
viewsIs there any way to render a Laravel view to a string?
I wonder if there is any way to save the return of a view on Laravel in a string. Usually we return to view to "print" the result of an action on the page: function getIndex() { return…
-
0
votes1
answer4816
viewsHow to change the width of a native bootstrap navbar?
Good morning. I need to change the width of a native navbar. I simply took the site boostrap.com and pasted it in my template.blade.php but it’s occupying the whole screen and I need to reduce its…
-
0
votes2
answers294
viewsSnappy does not render image in pdf?
I’m using Snappy to generate reports, but it’s not rendering the image I upload in my html, which I wonder if it might be? Code: Route::get('/report', function(){ $pdf =…
-
0
votes2
answers1153
viewsLaravel Relationship 5.2 Eloquent
Good morning, everyone, I’m having a problem in a relationship between tables with Elouquent (Laravel) I have two tables [clients / activities_commercial] (innoDB MYSQL) In the client table there is…
-
0
votes1
answer457
viewsHow to use Blade-Laravel in an MVC project that is not running with Laravel?
We have here in the company a large system in production that needs to be redone 100%. Among many discussions and uncertainties there is still no conclusion of the framework that will be used. At…
-
0
votes0
answers403
viewsHow to have a good identation of . Blade in Vscode?
Example of expected result: <body> @extends('t') @include('as') </body> Example of Reality with PHP extension <body> @extends('t') @include('as') </body>…
-
0
votes0
answers64
viewsBroken image in Laravel 5.6 [Homestead]
I uploaded an image to my application when using php Artisan serves, today I am using the Homestead, when I went to look the application barred my url and does not let be displayed. <img…
-
0
votes1
answer235
viewsPHP Laravel Blade {{{ $name or 'Default' }}} Printing 1
According to Laravel’s documentation {{{ $name or 'Default' }}} should behave as if(isset($name)) echo $name else echo 'Default' or echo isset($title) ? $title : 'Default' But it’s coming back 1 as…
-
0
votes1
answer1006
viewsHow to pass data from two tables in one View?
I’m trying to pass data from two tables(SQL) in a table structure HTML. When I try to pass to mine View, the Laravel does not recognise the relationship method. View - atualizador.blade.php…
-
0
votes2
answers269
viewsOperator "or" of Blade Laravel does not work
When I try to use the operator "or" in the Blade it processes wrong and the Undefined variable. I’m calling it that: {{ $confirmed or false }} But he’s compiling it like this: <?php echo…
-
0
votes1
answer210
viewsHow to use "break" in Blade template?
I’m developing a Checklist modal where the new protocol data will be registered. Each item attribute will be informed by the user and this information will be recorded in the table…
-
0
votes1
answer107
viewsHow to pick up specific item In the Laravel Blade
How do I pick up a specific item on Laravel Blade? Example: $(document).ready(function(){ var id = 1; $('body').append('{{ $projeto->'+id+'->name}}' }) <body> Deve Aparecer aqui o nome…
-
0
votes1
answer752
viewsLaravel 5.4 and Dompdf - problems?
I’m trying to generate a PDF from a view, and it’s working, however, when I call the route to call the controller, the upload is for several seconds, even minutes to generate the PDF, and download,…
-
0
votes0
answers61
viewsConvert string to path
I would like to save the route in the database. So I saved it like this. Example: Route table | id | rota | | 1 | route( 'login' ) Then I would like to recover and use as route even in Laravel, in…
-
0
votes2
answers649
viewsError while doing relationship with Lockable
Call to Undefined method Illuminate Database Query Builder::belongTo() My Models <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Imovel extends Model { //definindo nome…
-
0
votes1
answer42
viewsHow do I get the id of after the select?
user selects a user by name, I need to find out which id is chosen. Thanks guys, I’m new to Laravel! How I get the value of users->id? {!! Form::select( 'id_users', $users->pluck('name'),…
-
0
votes1
answer156
viewsHow to store select input data with Laravel?
I cannot send the selected data to the request: <select name="tipo_id" class="form-control col-md-3 col-xs-12"> <option value=""></option> @foreach ($tipos as $tipo ) <option…
-
0
votes1
answer1146
viewsLaravel 5.7 (Blade) - Ternary operator on two levels is not working
The following code works: if($cc->is_removed){ $status = 'Removed'; } elseif (! $cc->isActive){ $status = 'Inactive'; } elseif ($cc->isActive){ $status = 'Active'; } and on the same page…