Ein vollständiges Symfony-Bundle für das CompanyOS Backend-Frontend mit VueJS, CoreUI und modularem Admin-Interface.
**Dies ist eine Alpha-Version (0.1.212-alpha
Das BackendBundle ist ein reines Frontend-Bundle:
composer require companyos/backend:^0.1.212-alpha
// config/bundles.php
return [
// ... andere Bundles
CompanyOS\BackendBundle\CompanyOSBackendBundle::class => ['all' => true],
];
cd vendor/companyos/backend
npm install
# Development
npm run dev
# Production
npm run build
Das Bundle registriert automatisch die /admin-Route:
http://your-domain.com/admin
Das Admin-Interface bietet folgende Bereiche:
Das Bundle unterstützt automatisch:
# Im Bundle-Verzeichnis
cd vendor/companyos/backend
# Dependencies installieren
npm install
# Development-Server starten
npm run dev
# Watch-Modus
npm run watch
# Production-Build
npm run build
<!-- Resources/app/views/MyView.vue -->
<template>
<div>
<CCard class="mb-4">
<CCardHeader>
<strong>Meine View</strong>
</CCardHeader>
<CCardBody>
<p>Meine View-Inhalte</p>
</CCardBody>
</CCard>
</div>
</template>
<script setup>
// View-Logik hier
</script>
// _nav.js erweitern
export default [
// ... bestehende Navigation
{
component: 'CNavItem',
name: 'Meine View',
to: '/my-view',
icon: 'cil-star',
},
]
window.plugin_MyPlugin)// In custom/plugins/CompanyOSCRMPlugin/Resources/app/main.js
import CustomerList from './components/CustomerList.vue'
import ContractList from './components/ContractList.vue'
export const components = {
'CustomerList': CustomerList,
'ContractList': ContractList
}
export const routes = [
{
path: '/plugin/crm/customers',
name: 'crm-customers',
component: CustomerList,
meta: { title: 'Kunden', permission: 'crm.customers' }
},
{
path: '/plugin/crm/contracts',
name: 'crm-contracts',
component: ContractList,
meta: { title: 'Verträge', permission: 'crm.contracts' }
}
]
export const navigation = [
{ component: 'CNavTitle', name: 'CRM', permission: 'crm' },
{ component: 'CNavItem', name: 'Kunden', to: '/plugin/crm/customers', icon: 'cil-people', permission: 'crm.customers' },
{ component: 'CNavItem', name: 'Verträge', to: '/plugin/crm/contracts', icon: 'cil-file', permission: 'crm.contracts' }
]
window.plugin_CompanyOSCRMPlugin = {
components,
routes,
navigation,
name: 'CompanyOSCRMPlugin'
}
permission-Attribut habenDas Plugin-System ist jetzt vollständig dynamisch und benötigt keine statischen Entrypoints oder Navigationserweiterungen mehr!
Das BackendBundle konsumiert die API des CoreBundles:
// API-Calls
import axios from 'axios'
// Benutzer abrufen
const users = await axios.get('/api/users')
// Plugin installieren
await axios.post('/api/plugins/my-plugin/install')
// webpack.config.js
Encore
.setOutputPath('Resources/public/build/')
.setPublicPath('/bundles/companyosbackend/build')
.addEntry('app', './Resources/app/frontend/app.js')
.enableVueLoader()
{# admin.html.twig #}
<link rel="stylesheet" href="{{ asset('bundles/companyosbackend/build/app.css') }}">
<script src="{{ asset('bundles/companyosbackend/build/app.js') }}"></script>
# PHPUnit Tests
./vendor/bin/phpunit
# Frontend Tests (später)
npm run test
Dieses Bundle ist unter der MIT-Lizenz lizenziert. Siehe LICENSE für Details.
Siehe CHANGELOG.md für eine Liste der Änderungen.
How can I help you explore Laravel packages today?