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
-
0
votes2
answers426
viewsInterpretation of Tags with HTML
I am programming using the Laravel framework and normally to use PHP within HTML use double keys {{ $variavel }} When I should interpret the HTML inside this variable I use {!!$variavel!!} I didn’t…
-
0
votes0
answers110
viewsRendering templates with Blade
My problem is time to render this section below: The part: @include('admin::layouts.includes.footer') stay out of the div#wrapper, someone would tell me why and how to get you inside?…
-
0
votes1
answer3392
viewsMissing required Parameters for [Route]
I’m having trouble pinpointing the route because of the two parameters it has. Route::prefix('auction')->namespace('Auction')->name('auction.')->group(function() {…
-
0
votes1
answer53
viewsAdd Selected to option after equality check
I have the following select on a form in the Laravel: <div class="form-group has-feedback {{ $errors->has('nivel') ? 'has-error' : '' }}"> <label for="nivel" class="col-sm-2…
-
0
votes1
answer33
viewsError making the list
Trying to get Property of non-object: @foreach($civis as $civil) <tr> <td>01</td> <td>{{$civil->matricula}}</td> <td>{{$civil->nome}}</td>…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 12 months ago Jonathan Silva Gomes 21 -
0
votes1
answer32
viewsHow to recover a data with Select2 in the registry edition?
Follow the code of Lade, when I go to edit mode the corresponding data does not appear and yes Lect2 is empty. <select name="cliente_id"> <option value=""></option> @foreach…
-
0
votes2
answers88
viewsHow to recover calculated fields in Laravel?
My Edit controller $tipos = TituloTipo::all(); $devedores = Devedor::all(); $clientes = Cliente::all(); $divida = Divida::find($id); return…
-
0
votes1
answer150
viewsHow to show Laravel Storage image with Ajax?
I have a project that analyzes images and returns a frame and some variables, within the /storage/imagens/ where I save the image analyzed but I do not know how to make it be pulled by ajax and…
-
0
votes1
answer44
viewsEloquent returning JSON as variable
I have mounted the following query inside my controller: public function __construct() { $informations = Informations::get()->first(); View::share( 'informations', $informations ); } The idea is…
-
0
votes1
answer139
viewsRegister N for 1 and N for N?
How can I register in a relationship 1-N and of N para M, I’m doing it this way, but it’s not cool: $endereco = new endereco; $endereco->complemento = $request->complemento;…
laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 12 months ago Jonathan Silva Gomes 21 -
0
votes1
answer378
viewsCheck if registration already exists, if there is only link
I want to check if the address has already been registered, if it is already registered I just want to link it to a civilian, but if there is not yet want to register the new address and then link.…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 12 months ago Jonathan Silva Gomes 21 -
0
votes1
answer302
viewsjquery does not work on foreach Blade Standard
jquery script works if put out of foreach, but qd put in it does not work and shows no error in console: <div class="box-indicated"> @foreach($list_indicated as $indicated) <label…
-
0
votes1
answer26
viewsHow do I use the explode to limit which parts of a string should appear in the view?
I’m trying to use explode to display the first name of a resume model, in a table in the view, I was initially using the method below, but it didn’t work out the way I wanted, because it only…
-
0
votes2
answers117
viewsConcatenate more values into a value of an input in the Blade form
I Doubt how I can concatenate more values into the same input in the value of a form using Blade. Example: <input type="hidden" name="produto" value="{{ $produto->descricao}}"> I am only…
-
0
votes1
answer965
viewsLaravel 5 Eloquent View Blade with Foreign Key?
I get the following error: Trying to get Property 'name' of non-object I have a list of Suppliers and Payments, and I am using the following syntax to retrieve the Vendor name through the foreign…
-
0
votes1
answer1574
viewsTrying to get Property 'name' of non-object Laravel Eloquent Error when pulling foreign key data
I am trying to use relationships to show data on screen but I get the following error: Trying to get Property 'name' of non-object In this command…
laravel laravel-eloquent laravel-blade foreign-key modelasked 6 years, 10 months ago Gabriel Alves 41 -
0
votes1
answer363
viewsHow to show validation message below a group of radio buttons?
For the problem below consider that I am using Laravel (5.6* with default style files and javascript (no changes). My problem is basically when trying to display the validation message from the…
-
0
votes1
answer139
viewsError while working with date formatting in Laravel
I’m having a little trouble manipulating a input of the kind date. When using this type of input the date is formatted as Y-m-d, but in my form I want to type dd/mm/yyyy. Model User: //... protected…
-
0
votes0
answers266
viewsLaravel Blade prints html
For some reason when I use {{ }} to interpolate, Blade does not interpret the accents and print the html code on the screen instead of interpreting the code when I use {!! !! }, it prints correctly…
-
0
votes1
answer308
viewsLaravel - View [.site.Home.index] not found
I opened my localhost today to continue to start my project and I will have this error in all the pages I try to access, yesterday before closing the pages was working can anyone help me? error View…
-
0
votes0
answers83
viewsInitial SQL to list clients (PF and PJ). How to migrate a pure SQL Query to Laravel Eloquent?
I set up an initial SQL to pull the data. It’s working in pure SQL. I need to migrate this code to Laravel’s eloquent pattern. Can anyone help me? Thank you! Follow the example SQL: Code: SELECT…
-
0
votes1
answer577
viewsReturn form with data after Validator failure
I have a user registration form on Laravel <form class="form-horizontal" method="post" action="{{url('/usuarios')}}"> @csrf @if(session()->has('message')) <div class="callout…
-
0
votes1
answer729
viewsHelp Update Laravel
Good evening, I’m starting to study Laravel and I came across a problem that has already taken me a few hours in search of a solution. I need to update a form, and when I give the Submit I get the…
-
0
votes1
answer61
viewsDIV lose alignment if it is with a number of different lines
I’m trying to line up some divs but I realized that when the div that’s on the other side is not with the same line number on <p> it simply loses alignment, I am developing in Laravel using…
-
0
votes0
answers84
viewsLaravel Controller add content?
I’m new and I’d like some help, I have a controller carrying out a consultation. Controller $user = $this->user->find('1'); view('index', compact('user')); View @forelse ($user as $u)…
-
0
votes0
answers27
viewsLaravel: Templates Blades, Keep a modification made by a script after the view is extended
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="cm-menu-scroller"> <ul class="cm-menu-items"> <!-- Melhorias: dependendo…
-
0
votes0
answers204
viewsForeach nestled with Blade in Laravel
I need to display in a report three nested information and the idea is to display releases of a balance sheet, this balance sheet belongs to a plan of accounts and the plan of accounts belongs to a…
-
0
votes2
answers188
viewsList data from two unrelated tables in the same view
I have a view called form where I need it to appear, in the select field, the States(UF) coming from Mysql. I have the EstadoController where in the index method I do the listing using all. Now, I…
-
0
votes1
answer166
viewsExtending layout
I have 2 files: app.blade.php <html> <head> <title>App Name</title> </head> <body> <div class="container"> @yield('content') </div> </body> php…
laravel-bladeasked 5 years, 8 months ago Daniel Chung 25 -
0
votes1
answer73
viewsHow to apply filters in a belongsToMany relation in Laravel 5.8?
I have a table posts, a table categorias and a pivot table categoria_post, where a post may be associated with many or no category. In my model categoria and post I have the methods respectively…
-
0
votes0
answers179
viewsHow to view multiple content on @Yield from Laravel’s Blade template system?
Well, I have a site in progress in the programming language of Laravel. In my welcome.blade.php I created a @yield so-called sides After the creation of that yield, created the folders in my…
-
0
votes1
answer25
viewsRestrict Only Lessons from a Course via Laravel Controller
Well, even I don’t know how to ask properly why it’s been less than a week since I started studying Laravel. Please, I ask for everyone’s understanding! My case is the following: I have a table of…
-
0
votes2
answers242
viewsHow to instantiate one model inside the other in the view?
Error: Property [id] does not exist on this Collection instance. MIGRATION DIVIDE <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use…
-
0
votes0
answers239
viewsBlade directives (Laravel 5.6) inside the Vue.js slot element
I created a Blade directive called @permissao which simply checks whether a certain value exists in the user’s session, in order to show or hide a link from the menu. The menu I created as a…
-
0
votes1
answer490
viewsCatch a certain amount on a Foreach on the Blade
I wanted to know how I do to walk through a Collection and result a certain value? The Collection works like this and returned various values of employee appointments to be printed on the point,…
-
0
votes1
answer32
viewsI’m trying to load the session on the main page with Blade’s directives, but it doesn’t, why?
main.blade.php <!doctype html> Hello, world! @yield('conteudo') <!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script…
-
0
votes0
answers106
viewshow to use an Asset of a package in Laravel without copying to the public folder
I created a package Modular that is already working, However I am barred at the time of using assets. Not using the command php artisan vendor:publish I can’t get access to {{asset…
-
0
votes2
answers131
viewsHow to access belongsTo and hasOne in the view? - Relationship 1 - 1 bidirectional
I am with project Laravel 6.0 and have the entity User and address, where user has 1 address, as well as an address belongs to 1 user (bidirectional). The problem is that list all addresses and in…
-
0
votes1
answer79
viewsMany Relationship for Many Laravel - For each Blade
I’m starting at the Laravel. I have the following problem. I have three tables with relationship N:N. ctrl_cm_tecnicos ctrl_lista_tecnicos acl_lista_tecnicos The tables relate as follows. I have a…
-
0
votes1
answer20
viewsI’m having trouble leaving a blue button on the side
The problem here is: I am using a foreach to scroll through an array while trying to check $like->id_post === $post->id && $like->id_user === auth()->user()->id if it is to…
-
0
votes1
answer341
viewsModal bootstrap to edit entries in Laravel
Hello, I’m a beginner in PHP/Laravel programming and would like to include a modal for the registration and editing of database records. Follow the example: In my index.blade.php I have:…
-
0
votes1
answer34
viewsHow to display data correctly in a datatable
I need some information about running two tables through the index. I have the following code in the controller: public function index(){ $tabela = capitulo::orderby('id', 'desc')->paginate();…
-
0
votes0
answers94
viewsHow to use the middleware auth in Laravel 8 correctly?
People created this group of routes for certain pages of my project to be protected by middleware auth: Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'as' => 'admin.'],…
-
-1
votes1
answer575
viewsSend variable to the layout in laravel4 with Blade
I have a problem here I need to send a variable to my layout, I tried so: On the controller $this->layout->page = 'Atendentes'; and in the layout that @yield('page') the problem is that I need…
-
-1
votes2
answers90
viewsPopular select with result plus a null element
I have a method that invokes the view as follows: return view('auth.register',[ 'teachers' => $this->user->mentors()->lists('name','id'), ]); And in the view, the select using {{…
-
-1
votes2
answers7222
viewsHow to pass a variable to Blade?
I have the following scenario: Some types of user may have access to the site, say USERTYP1, USERTYP2 or USERTYP3. My application menu changes according to user type. I have a master template…
-
-1
votes1
answer444
viewsStylization of views - Laravel
By Laravel’s default, the view welcome.blade.php comes with styling in the view itself and not in a separate file. I wonder if this practice of styling the view in the same file is correct or should…
-
-1
votes1
answer261
viewsHow to put 3 parameters in input value? Laravel 5.7
I need to put a default value in a text input. The default value will be 'Brazil', but I’m using the old helper in Blade and I don’t know how to enter this default value. the code I’m using is this.…
-
-1
votes2
answers68
viewsCheck ID with a single foreach
I wonder if you have a certain id, without having to do two foreach @forelse($surveys as $survey) @forelse($survey->users as $user) @if($user->id == $auth()->user()) AÇÃO @empty @endfor…
-
-1
votes1
answer337
viewsLaravel helpers do not work in shared hosting production mode
I have an Laravel 5.6 application hosted at Ycorn, there, because it is shared, I do not have SSH access, which makes it difficult to implement the framework. With that, the helpers {{asset()}} and…