定制 mimirtechco/apiato-bap-livewire 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mimirtechco/apiato-bap-livewire

Composer 安装命令:

composer require mimirtechco/apiato-bap-livewire

包简介

Base Admin Panel Livewire Container for Apiato.

README 文档

README

apiato-bap-livewire is an Apiato container that brings Base Admin Panel based on LiveWire to Apiato Container instructure.

With Apiato Base Admin Panel with Livewire you will have a complete based admin panel for your Apiato project.

This project is only possible thanks to:

Laravel Livewire

This Apiato container provides a simple and easy way to add Livewire to Views.

Github https://github.com/Elshaden/apiato-livewire.git

Why would anyone use an API Backend for a Frontend application?

Well, if you are familiar with Apiato, you would know that Apiato uses the DDD pattern, Domain Driven Design, this will make your code very well organized, easily maintainable, and most important, simple to have many developers work on the same application. While, the makers of Apiato, insist that it is mainly focused on API backend, I disagree, Apiato can handle both Web application as a frontend, and at the same time deliver flawless API backend.

Don't take my word for it.. Go on and give a test run...

#Usage

In Existing Apiato Application

composer require elshaden/apiato-livewire 

Once Installed via Composer Require to install the container in Apiato Application

Apiato Container Installer for more details

To Create a new Livewire Component V4

V4 uses an Apiato Generator, which will make all necessary boilerplate.

php artisan apiato:generate:container:livewire

you will be prompted to enter the Details of the Component

  • for Section enter Livewire or just enter, the system will create under the Livewire section regardless.
  • for File name just click enter leave as is
  • for the Container Enter the name of the Container, Not to be confused with the Component, this is just like any other Apiato Container
  • the Component , that is your desired Livewire Component , you can use dots to define subfolders within the same Container

This will create a new section called Livewire

  • app

  • Containers

  • AppSection

  • Livewire

    • Configs
    • Providers
    • UI
      • WEB
      • Routes
      • Views
    • <LivewireComponent1 / Or Livewire Component Dir1 >
    • <LivewireComponent2 / Or Livewire Component Dir2 >
  • Vendor

  • ...

  • Livewire

  • ... `

usual Livewire Class and View will be created in these folders

You must change the render method in the Livewire Component Class

 public function render() {  
		 return view('livewire@<ContainerName>::component');  
 }

Views

The View Must Extend layouts.app
@extends('vendor@livewire::layouts.app')

In this view you must call the related Livewrie Component in the @section('content')

@section('content')

<div>
@livewire('<component name>') 
</div>
@endsection

Blade Components

You can Create your own Blade Component and use them in the views you have to register all of them in the Main service provider in the container.

The same can be done with Livewire UI Modal, which is added by default
for more Details on Livewire UI Modal visit https://github.com/livewire-ui/modal

Now you can use Livewire as Web frontend with Livewire, and all the classes of Apiato at your disposal.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固