laravel-blade Questions
3
Solved
I have a Laravel 7 project with the need of a lot of data transformation from the model to the views before being displayed.
I thought about using Laravel Accessors and use them directly in my bla...
Hoicks asked 7/5, 2020 at 16:37
6
Solved
I would like to know what would be the best way to display a default value if the given value is not set. I have the following in a blade file (I can not guaranty that the key is set, it depends on...
Parasynthesis asked 2/8, 2013 at 18:9
7
Solved
I am displaying elements of an array @foreach($tags as $tag)$tag->@endforeach. The output is tag1tag2tag3. What is the possible way to sho elements of array in tag1,tag2,tag3. And how to not sho...
Gorky asked 18/11, 2016 at 9:51
1
Solved
In my project, I use some resources (mainly images) in both SASS and Blade. Also, I have some resources only used in SASS, and some only used in Blade.
For example, I could use mix('images/logo.pn...
Ralf asked 15/4, 2020 at 9:50
2
Solved
I'm trying to use laravel blade templates including some javascript code into child view.
I have my mail app.blade.php file, where is placed string of jquery initialization:
<script src="/js/j...
Holder asked 20/4, 2016 at 7:2
3
Solved
I would like to create a way to compile in a view, the try/catch.
How can I do this in Laravel?
Example:
@try
<div class="laravel test">
{{ $user->name }}
</div>
@catch(Exception ...
Arnettaarnette asked 14/7, 2015 at 15:37
2
Solved
@if(Request::is('login') OR Request::is('tags') OR Request::is('categories') OR Request::is('posts') OR Request::is('tags/..') OR Request::is('categories/..') OR Request::is('posts/..') OR Request:...
Arrhythmia asked 26/11, 2016 at 17:14
2
Solved
I need a WYSIWYG HTML editor that can edit PHP Blade and Handlebars* templates. I've tried TinyMCE, CKEditor and bootstrap wysihtml5 but they all "fix" my invalid HTML. Can anyone suggest an altern...
Boom asked 1/7, 2016 at 16:30
2
I want to use dropzone as a file input of another form
Following is the code with <input type="file"> with some help from Dropzone.js and Stackoverflow:
<form class="form-horizontal" act...
Stilton asked 6/5, 2018 at 1:21
2
Solved
I've been working on a project with pure vanilla html and php and I want to transfer it to laravel. Now I'm stuck when I want to show an iframe (a blade file) inside another page (another blade fil...
Chromous asked 5/3, 2020 at 14:23
3
Solved
I have a user-input text displayed on one of the pages. I want to allow new lines, though. How do I display the text, so it is escaped AND allows new lines?
I used nl2br() and Blade's tripple brac...
Evanne asked 19/1, 2015 at 14:47
2
I use lots of class constants in my models. When I want to use them inside blade I start by importing them at the top of the template.
For example:
@php
use App\Model\Core\User;
@endphp
Later ...
Crenelate asked 12/11, 2017 at 21:41
9
I'm trying to create a blade directive to highlight some words that will return from my search query.
This is my blade directive:
class AppServiceProvider extends ServiceProvider
{
public funct...
Emelia asked 6/12, 2016 at 19:54
3
Solved
In my view I have
<p>{{ trans('mission-vision-page.mission-description') }}</p>
I've put a block of text in my language file, but I want to maintain the new lines. I've tried:
1.
r...
Trine asked 9/6, 2016 at 13:34
3
Solved
We can use a section to define some HTML and then yield that somewhere else.
So why do we have stacks? https://laravel.com/docs/5.2/blade#stacks
It's doing exactly the same thing with different ...
Ileanaileane asked 27/2, 2016 at 16:48
3
Solved
I just finished my project using only the Laravel framework. Now I want to add vue.js into my project to render the views without loading them. I went through some tutorials and found that I need t...
Agreement asked 31/1, 2020 at 8:42
6
Solved
I want to create a resourceful link with Laravel.
Normally I just use the {{ link_to_route('Yadayadayada.route', 'LinkName', $params }}
But in this case I am using a Template with this layout:
&...
Signboard asked 31/3, 2014 at 0:37
2
Solved
I have a url with some query string. I know I can get the full string with url()->full(). But I want to add extra query string with it. And there I am facing problem.
So far I have tried, href=...
Lubow asked 19/2, 2019 at 9:33
2
I have a question, I used the same blade template to create and insert. In my controller I created a variable ModificationMode on edit function and on the template I used isset() method.
Controlle...
Hagler asked 14/1, 2020 at 23:44
1
Solved
I want to display the content of my session with the same style that the dd() function.
I try to do this :
<div>
{!! dump(session()->all()) !!}
</div>
And i get this error :
Fa...
Aut asked 14/1, 2020 at 12:51
4
Solved
i'm want to creating a design pattern and use the "Blade templating engine".
Can I use the Blade templating engine outside of Laravel and use it in my new pattern ?
Chinookan asked 26/10, 2016 at 23:32
2
With Laravel Blade, is there an elegant way to check if a view exists before doing an @include?
For example I'm currently doing this:
@if(View::exists('some-view'))
@include('some-view')
@endif
...
Kolyma asked 4/2, 2016 at 10:7
5
Solved
If I wanted to make a currentUser() function for some oauth stuff I am doing where I can use it in a view or in a controller (think rails, where you do helper_method: current_user in the appl...
Cacoepy asked 6/9, 2015 at 3:4
3
Solved
So my Mailable view is throwing this error - and this is all I have on my hands. It was working fine while I was on Lumen 5.8, so my guess is that it happened after upgrading to Laravel 6.
Call ...
Riess asked 17/10, 2019 at 12:18
2
Solved
I am making a bilingual app. I am using same routes for each but I am using different views for both languages. Whenever I want to redirect to a route I want to pass {{ route('test.route', 'en') }}...
Eos asked 6/1, 2017 at 12:46
© 2022 - 2024 — McMap. All rights reserved.