正如标题所述,我试图使用 Tailwind CSS 使父 div 中的 div 跨列对齐。但是,由于上传到每列的图像大小不同,它们没有对齐。我不想调整图像大小。我用红色圈出了我想要在底部对齐的 div。Github 仓库
我尝试过此处引用的不同设置
我想要对齐的特定子 div 来自<div className="p-4 bg-black">
我想知道是否有人可以提供帮助?
return (
<div className="flex justify-end">
<div className="px-4" style={{ maxWidth: '1600px' }}>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 pt-4">
{
nfts.map((nft, i) => (
<div key={i} className="border shadow rounded-xl overflow-hidden">
<img src={nft.image} />
<div className="p-4">
<p style={{ height: '64px' }} className="text-2xl font-semibold">{nft.name}</p>
<div style={{ height: '70px', overflow: 'hidden' }}>
<p className="text-gray-400">{nft.description}</p>
</div>
</div>
<div className="p-4 bg-black">
<p className="text-2xl mb-4 font-bold text-white">{nft.price} …Run Code Online (Sandbox Code Playgroud) 我在本地下载了这个模板(https://github.com/sinan-aydogan/tailadmin-laravel),然后将其上传到 Bitbucket 上,以便使用 Laravel Shift 从 Mix 转换为 Vite。然而,当我运行它时,我得到了以下结果。
无法加载资源:net::ERR_CONNECTION_REFUSED vue-i18n.esm-bundler.js:39 您正在运行 vue-i18n 的 esm-bundler 版本。建议将捆绑程序配置为使用布尔文字显式替换功能标志全局变量,以便在最终捆绑包中获得适当的树摇动。initFeatureFlags @ vue-i18n.esm-bundler.js:39 app.js:45 未捕获(承诺中)ReferenceError: require 未在 m2 处的解析 (app.js:45:24) 处定义 (createInertiaApp.js:8:52 )在exports.createInertiaApp(createInertiaApp.js:12:24)在app.js:43:1 DevTools无法加载源映射:无法加载chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/browser-polyfill.js.map的内容:系统错误:net::ERR_FILE_NOT_FOUND
请查看屏幕截图以更好地了解错误:

资源/js/app.js
import "./bootstrap";
import { createApp, h } from "vue";
import { createInertiaApp } from "@inertiajs/inertia-vue3";
import { InertiaProgress } from "@inertiajs/progress";
/* FontAwesome */
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import "@/Sources/icons";
/* Multi-language */
import { createI18n } from "vue-i18n";
import generalLangBg from "@/Lang/bg/general_lang_bg";
import generalLangDe …Run Code Online (Sandbox Code Playgroud) 根据文档:
确定请求路径是否匹配模式
if (Request::is('admin/*'))
// What are the support patterns in laravel 4 request beside the wildcard?
{
//
}
Run Code Online (Sandbox Code Playgroud)
我似乎无法找到提供更多示例而不仅仅是通配符的文档.
当我同时使用 PDO 和 Laravel DB 对象时,我遇到了问题。我在一个旧的 PHP 项目上工作,有几个 PDO 用法。我尝试逐渐将 Laravel 与 DB 对象一起使用。但是我的代码中有很多 PDO 事务,并且DB Laravel 使用了我的 PDO 对象的不同 postgres 句柄。
所以Laravel DB 忽略了我的 PDO 事务。我想用与我的 PDO 对象相同的数据库句柄来实例化 Laravel DB 对象。
我的问题示例:
PDO -> BEGIN transaction
PDO -> add records
LaravelDB -> Remove these records
PDO -> COMMIT transaction
Both PDO and Laravel -> Records exist. So Laravel query has no effect.
Run Code Online (Sandbox Code Playgroud)
你知道一种方法吗?
我使用 Postgresql 9.1 和 Laravel 4.1。
我想添加动态页面标题,就像我有一个帖子列表,当我点击单个帖子详细信息页面打开时,在这种情况下,我希望动态标题显示在头文件中.让我与你分享代码.
@extends('layouts.app')
@section('title', 'This is {{$post->title}} Post Page')
@section('contents')
<h3>{{$post->title}}</h3>
<p>{{$post->body}}</p>
@endsection
Run Code Online (Sandbox Code Playgroud)
您可以在本节中看到@section('title','This is {{$ post-> title}} Post Page'){{$ post-> title}}但它不起作用..它显示的是这样的东西.
这是标题); ?>帖子页面
在app.blade.php上,我有类似的东西
<title>Laravel Practice - @yield('title')</title>
Run Code Online (Sandbox Code Playgroud) 我正在 Laravel 中创建一个表单,它有两个字段:departure-date和return-date。我正在尝试创建自定义验证逻辑,其中输入的出发日期必须在用户填写表单后的同一天或任何其他日期。也return-date应该在 后departure date。请帮忙?
表格布局
<!-- Departure date-->
<div class="form-line registar2 love {{ $errors->has('departure_date') ? ' has-error' : '' }}">
<input type="date" class="form-input" name="departure_date" value="{{ old('departure_date') }}" required>
<label>Departure Date *</label>
<div class="error-label">Field is required!</div>
<div class="check-label"></div>
@if ($errors->has('departure_date'))
<span class="help-block">
<strong>{{ $errors->first('departure_date') }}</strong>
</span>
@endif
</div>
<!--End departure-->
<!-- Return date-->
<div class="form-line registar2 move {{ $errors->has('return_date') ? ' has-error' : '' }}">
<input type="date" class="form-input" name="return_date" value="{{ …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Laravel Eloquent查询从我的数据库中检索字符串.但是,我得到的数据是完全上限.我只希望第一个字母是大写的.有人可以帮帮我吗?
$main = DB::table('master_accountsmain')->get()
Run Code Online (Sandbox Code Playgroud)
我正在使用...传递主要观点...
return view('home', 'main' => $main);
Run Code Online (Sandbox Code Playgroud)
我尝试过使用ucfirst($main),但不起作用.数据保持大写.
我制作了一个 PWA 应用程序,"display": "standalone"在清单中。我的理解是我的应用程序应该在没有地址栏的情况下在本地启动。但是,有一个地址栏。
我究竟做错了什么?我正在运行 Chrome 70。问题发生在 OSX 和 Linux 上。我没有检查 Windows。我的应用程序托管在https://www.themendapp.com。
请指教。
我读了源代码,只有一个管道将所有中间件作为数组读取。这些中间件应该在请求之前运行dispatchToRouter.
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
Run Code Online (Sandbox Code Playgroud)
但是,如果我创建了一个后置中间件,则该后置中间件应该在请求处理后运行。这里以及何时在 Laravel 源代码中执行后置中间件?
从刀片的模板到标签td foreach我要增加一个。我怎样才能做到这一点?
@foreach($winners as $winner)
<tr>
<td scope="row">
<span class="badge">1</span>
</td>
<td style="width:300px">
{{ $winner->name }}
</td>
<td></td>
<td style="width:50px">
{{ $winner->point }}
</td>
</tr>
@endforeach
Run Code Online (Sandbox Code Playgroud) laravel ×8
php ×4
javascript ×2
laravel-4 ×2
css ×1
date ×1
eloquent ×1
inertiajs ×1
laravel-5 ×1
laravel-vite ×1
manifest ×1
next.js ×1
oop ×1
pdo ×1
postgresql ×1
tailwind-css ×1
validation ×1
vite ×1