可以在PHP Laravel刀片中使用原子设计吗?

发布于 2025-02-12 18:08:18 字数 223 浏览 0 评论 0原文

在React中,您可以在具有自己的JS和CSS的文件夹中创建单独的组件。 在Laravel中,我看到了使用@includes()@extends()@yarn()@section的可能性()发送参数以编辑内部内容并模拟React,但与依赖关系(CSS和JS)有关,这些内容并未在刀片上的正确位置分配。我该如何解决?

In React, you can create separate components in folders, which have their own JS and CSS.
In Laravel I saw the possibility of using @includes(), @extends(), @yarn(), and @section() sending parameters to edit the internal content and simulate react, but in relation to dependencies (css and js), these are not allocated in the correct positions on the blade. How can I resolve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆光飞翔i 2025-02-19 18:08:18

您的问题并不十分清楚,但是假设我对您的问题的理解,这是一种可能性之一。

  1. 您可以创建以下刀片结构:
|---- View
       |----- Inc
               |--- header.blade.php
               |--- footer.blade.php
       |--- main.blade.php

现在,在您的main.blade.php中

@include('inc.header')

 // all your main content here

@include('inc.footer)

Your questions isn't extremely clear, but assuming my understanding of your question, here is one of the possibility.

  1. You create the following blade structures:
|---- View
       |----- Inc
               |--- header.blade.php
               |--- footer.blade.php
       |--- main.blade.php

Now, within your main.blade.php

@include('inc.header')

 // all your main content here

@include('inc.footer)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文