问题标签 [laravel-blade]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
css - Blade bootstrap foreach 获得漂亮的网格系统
我在 Laravel 的 Blade 视图中有这段代码:
显示所有问题。我希望它们以3 的漂亮行显示。但是,有些文本($question->text)比其他文本更长,因此它们不会总是完美地开始新行,而是附加到最短的先前网格,如您在屏幕截图中所见。
我想要的更像是一张桌子,三列,然后是相同高度的新行,包含三个新项目。
所以我正在寻找一种方法
要么将所有列返回相同的高度
或者在每三列之后自动添加和关闭一个行 div。
最好的方法是什么?
css - 如何更改 Bootstrap 复选框的大小?
想知道是否可以像使用按钮一样更改复选框的大小。我希望它更大,所以它很容易按下。现在它看起来像这样:
代码:
laravel - Blade link to script
Wondering how can I link with blade syntax to my jquery/javascript files?
This didn't work:
laravel - Laravel 4 逻辑组织返回换行文本
我想知道在刀片中显示信息之前我可以在哪里包装信息。
确实,在我看来,我通常使用类似的东西。
好的,它很酷,但在视觉上,它很差,例如,我会制作状态,“更用户友好”,显示一个icon,具有不同的class,clor,具体取决于状态值。
问题是,我应该在哪里做这个?在哪个文件中?我可以在模型中做到这一点,但这显然不是保持 MVC 逻辑和保持代码简洁的好方法。
我尝试使用演示者类,但我无法在 $computer 视图中调用组件演示者,我想在其他组件中显示此状态设计。
如果您有任何想法、建议或其他逻辑,我“知道”!
php - Laravel 刀片:你能产生一个默认的部分吗
如果我有一个布局调用RightSideBar.blade.php
,Laravel blade
一个区域yield('content')
和另一个yield('sidebar')
。
default partial
如果正在扩展的视图RightSideBar
没有a ,是否有内置的方式来显示a section('sidebar')
?
我知道您可以默认传递一个值,只是想知道是否有办法将默认设置为部分。
php - 如何在 laravel 中使用编码和解码
在我们使用的核心 php 中url_encode()
,url_decode()
我们可以在 laravel 4 中使用这个函数。如果可能,请告诉我如何。
我想编码$users->id
。这个 id 是什么过程或方法来编码这个 id 请帮助解码。
laravel - 我如何知道 Blade 模板中数组的大小?
我需要这样的东西:
这可能吗?
php - Laravel 在 Blade 模板中转义所有 HTML
我正在 Laravel 中构建一个小型 CMS,并尝试显示内容(存储在数据库中)。它显示 HTML 标签而不是执行它们。就像所有打印数据都有一个自动 html_entity_decode 一样。
我尝试使用花括号打印内容。
和三重花括号。
他们给出了相同的结果。我需要执行这些 HTML 标签而不是转义它们。
php - Laravel 刀片复选框
我想从数据库中设置复选框状态,所以我写,
但是,如果我想将“id”设置为复选框,例如
它总是将我的复选框状态设置为 true。(在用户选择之前)
那么,在用户选择复选框状态之前,如何在刀片复选框中设置“id”?
laravel - Including CSS in Laravel 5 or 4.3
TL;DR: What is the correct way to link to a stylesheet in Laravel 5?
Background: I'm using the dev version of Laravel 4.3 (5) because I want to use Socialite, and it makes sense to develop with that from the start. I am having a problem getting templates transferred from 4.2
I've moved my blade layout files to the new directory structure (resources/templates) and placed my CSS in the public/css/ folder.
When I load my route /test/ all I get is "Whoops, looks like something went wrong."
For testing purposes I've removed all blade layout syntax from my layouts - the raw HTML works, but there is no styling (as there is no linked stylesheet). That tells me the routes, views and controllers work.
The problem:
In my layouts, if I remove the following, the layouts work:
Question:
What is the correct location and syntax for Blade Stylesheet inclusion in Laravel 5 and what I should be using instead?