我想在CSS中实现网格效果,其中元素的大小都相同但高度不同.我希望下面的元素总是在底部的50px,无论下一个是什么.
我试过浮子,但那个错误.所以我尝试使用Flex,但它仍然没有做我想要的.
.container
display: flex
flex-wrap wrap
align-content flex-start
align-items flex-start
Run Code Online (Sandbox Code Playgroud)
我想要的是什么:
是)我有的:
我的搜索表单有一个SQL查询.
$term = $request->get('term');
$queries = Article::where('title', 'LIKE', '%' . $term . '%')->published()->get();
Run Code Online (Sandbox Code Playgroud)
我的研究正在进行中.如果我有一篇名为"我的伟大文章很棒"的文章,并且我在我的搜索表单中写了"greate article",它就可以了.
但是,如果我写"文章真棒",这些词语就不会互相影响,而且它不起作用.
如何使我的查询仅使用关键字?
谢谢
我正在尝试在Visual Studio代码中创建一个代码段.这有效,但缺少缩进:
我的片段:
"HTML structure": {
"prefix": "html",
"body": [
"<!DOCTYPE html>",
"<html lang='fr'>",
"<head>",
"<meta charset='UTF-8'>",
"<meta name='viewport' content='width=device-width, initial-scale=1.0'>",
"<meta http-equiv='X-UA-Compatible' content='ie=edge'>",
"<title>$1</title>",
"</head>",
"<body>",
"$2",
"</body>",
"</html>"
],
"description": "Base template for html file"
}
Run Code Online (Sandbox Code Playgroud)
你看到什么了 :
<!DOCTYPE html>
<html lang='fr'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<title>test</title>
</head>
<body>
test
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我想要的是什么:
<!DOCTYPE html>
<html lang='fr'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<title></title>
</head>
<body>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我无法将我的 Laradock docker 与 Sequel Pro 连接。
在我的 .env 文件中
### MYSQL
MYSQL_VERSION=8.0
MYSQL_DATABASE=default, athsurvey
MYSQL_USER=homestead
MYSQL_PASSWORD=secret
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=root
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
Run Code Online (Sandbox Code Playgroud)
在我的 Sequel Pro 界面中,我输入了:
host: 127.0.0.1
user: homestead
pass: secret
Run Code Online (Sandbox Code Playgroud)
但这不起作用。您知道如何使我的连接成功吗?应该很简单...
非常感谢!
我使用 Spatie/laravel-translatable 包将翻译后的数据以 json 形式存储在数据库中。
\n\n我有一个专栏标题:
\n\n{\n "fr":"L\\u2019\\u00e9quipe",\n "en":"Team",\n "de":"Team"\n}\nRun Code Online (Sandbox Code Playgroud)\n\n正如您所看到的,通过该包,特殊字符被转换为 unicode。
\n\n当我想搜索时,它不起作用(这是合乎逻辑的,因为我正在寻找这个词,\xc3\xa9quipe但在数据库中它说\\u00e9quipe)
$search = $request->get(\'search\')\n\nEvents::where(\'title\', \'LIKE\', \'%\' . $search . \'%\')->published()->get();\nRun Code Online (Sandbox Code Playgroud)\n\n如何通过 Unicode 进行搜索才能正常工作?
\n\n谢谢
\n在我的PHP代码中,我注意到我只能使用foreach来访问我的值。谁能解释为什么?
return view('pages.temp_page_course', [
'page' => $this->course($slug),
]);
public function course($slug)
{
$course = Course::where('slug', $slug)->get();
return $course;
}
Run Code Online (Sandbox Code Playgroud)
使用此代码,我可以访问该值。
@foreach($page as $key => $course)
{{ $course->title }}
@endforeach
Run Code Online (Sandbox Code Playgroud)
我如何在不进行前言的情况下获取价值?
非常感谢你
我有一个用 vue-router 创建的路由。
{
path: '/events/:id',
component: Event,
name: 'Event',
meta: {
title: 'Design Web'
}
},
Run Code Online (Sandbox Code Playgroud)
在“meta”中,我给它命名了我的页面。
我可以通过这样做来调用我的页面的标题: $route.meta.title
但是现在,我面临一个问题。在我的页面标题中,我想传递一个变量(我的事件的名称)。
meta: {
title: $nameOfEvent
}
Run Code Online (Sandbox Code Playgroud)
怎么做 ?
谢谢
我构建了一个应用程序。我有一个带有我页面标题的标题。目前,我使用视图路由器来定义我的标题。
{
path: '/events',
name: 'events',
component: Events,
meta: {
title: 'Liste des événements'
}
}
Run Code Online (Sandbox Code Playgroud)
在我的刀片视图中,在我的 header.blade.php 中,我这样做是为了显示标题
<h2 class="header__title title-header">
@{{ $route.meta.title }}
</h2>
Run Code Online (Sandbox Code Playgroud)
它工作但是当我有动态数据时,它必然不起作用。例如,当我发布帖子时,我该怎么做才能获得头衔?
{
path: '/events/:id',
component: Event,
name: 'Event',
meta: {
title: 'my dynamic title',
page: 'event',
},
Run Code Online (Sandbox Code Playgroud)
如何恢复帖子页面的标题?我的帖子中有帖子的名称,但我无法从标题中访问它...
我无权访问其他组件。这些是来自 element-ui 的组件。
先感谢您
I created an API with Laravel. I use Vuejs for the front end.
I would like to generate a PDF based on the user and download it with view. Only, it does not work.
Here is my controller:
public function generate($id)
{
$data = CoverLetter::where([
['id', '=', $id],
['user_id', '=', auth()->user()->id]
])->first();
$path = public_path() . '/pdf/' . $data->filename . '.pdf';
$pdf = PDF::loadView('pdf.coverletter', $data);
$pdf->save($path);
return response()->download($path);
}
Run Code Online (Sandbox Code Playgroud)
And my function in vue :
async downloadCoverLetter(file) {
axios.get('/cover-letter/generate/' + …Run Code Online (Sandbox Code Playgroud) 我在SQL中为空.
我有两个表works和types.
works包含type_id引用工作类型的foreign_key (在我的数据库中,这是类型的ID).
type包含ID,name和slug.
我想从特定类型获得所有作品.示例:获取所有类型的工作website(网站是slug).
我与模特工作的关系
public function type()
{
return $this->belongsTo('App\Models\Type');
}
Run Code Online (Sandbox Code Playgroud)
我的模型类型的关系
public function works()
{
return $this->hasMany('App\Models\Work');
}
Run Code Online (Sandbox Code Playgroud)
我试过这个,但这完全错了
Work::with('types')->where('slug', $request->get('type'));
谢谢 !