定制 networkrailbusinesssystems/support-page 二次开发

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

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

networkrailbusinesssystems/support-page

最新稳定版本:3.0.1

Composer 安装命令:

composer require networkrailbusinesssystems/support-page

包简介

Allows you quickly add a support page to your project

README 文档

README

Composer status Coverage status NPM status PHP version Tests status

Use the Support Page Library to add the following to your GOV.UK Laravel library Project:

  • Admin access to create, edit and delete Support Details.
  • A Support Page to display Support Details.

What's in the box?

  • Laravel 11 Blade Support Page Admin Access in the GOV.UK Design
  • Laravel 11 Blade Support Page in the GOV.UK Design
  • PHP 8.3

Installation

Via Composer: composer require networkrailbusinesssystems/support-page

Publish files

All essential files are published via the command php artisan vendor:publish --provider="NetworkRailBusinessSystems\SupportPage\Providers\SupportPageProvider" --tag="support-page".

This command includes the support-page tag files:

support-page

This command will publish the config and database migration:

  • /config/support-page.php
  • /database/migrations/2023_02_07_105304_create_support_details_table.php

support-page-views

This command will publish the Blade views:

  • /resources/views/details
  • /resources/views/show.blade.php

Set-up

Pre-requisites

The Support Page library requires the GOVUK Laravel Forms Route Macro.

Routing

A route macro is provided to handle the Support Page, and it's Admin functions. Add the following to your routes/web.php file:

Route::supportPage();
  • Add the permission'manage_support_page' with admin rights.
  • Add a 'Manage Support Details' link to the admin blade with the route support-page.admin.index and wrap the section with @can:
@can('manage_support_page')
    <li>
        <x-govuk::a href="{{ route('support-page.admin.index') }}">
            Manage Support Details
        </x-govuk::a>
    </li>
@endcan
  • Register the form SupportDetailForm::class in the GOVUK Config.
  • Update permissions and run database migrations.

Configuration

There are three configurable values in the Support-page config:

Option Type Default Usage
support_page_title string Support Customise the title of the support page
enquiry_route string enquiry Customise the enquiry page link
excluded_roles array [] Exclude these roles from being assignable contacts for Support Details
permission string manage_support_page Permission to manage the support page
role_model model Spatie\Permission\Models\Role::class Set the Role Model to use
user_model model App\Models\User::class Set the User Model to use

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-26