componist/laravel-stubs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

componist/laravel-stubs

Composer 安装命令:

composer require componist/laravel-stubs

包简介

README 文档

README

A Laravel package for pre-built layout and page stubs that save time when developing Laravel applications.

Description

The Laravel Stubs package provides pre-built Blade templates and PHP components for fast web development with Laravel. It includes professional layout templates with SEO optimization, responsive design, and modern web standards.

Features

  • 🎨 Professional Layout Templates with SEO optimization
  • 📱 Responsive Design with modern meta tags
  • 🔍 SEO-optimized with Open Graph and Twitter Card support
  • 🎯 Multi-Language Support with Hreflang tags
  • Vite Integration for modern asset bundling
  • 🍪 Smooth Scrolling JavaScript functionality

Installation

Add the package to your composer.json:

composer require componist/laravel-stubs --dev

Usage

Available Stub Tags

The package offers two different stub tags:

1. Publish Page Stub

Publishes a new page template file:

php artisan vendor:publish --tag=componist-page-stub

Result: Creates resources/views/page/page.blade.php

2. Publish Layout Stub

Publishes the layout template and PHP component:

php artisan vendor:publish --tag=componist-page-layout

Results:

  • resources/views/layouts/app.blade.php
  • app/View/AppLayout.php

Template Structure

Layout Template (layout.blade.php)

The layout template contains:

  • Complete HTML structure with DOCTYPE and meta tags
  • SEO optimization:
    • Meta description, keywords, robots
    • Open Graph tags for social media
    • Twitter Card Meta tags
    • Canonical URL
    • Hreflang for multi-language
  • Favicon configuration for all device sizes
  • Vite integration for modern asset bundling
  • Smooth scrolling JavaScript functionality

Page Template (page.blade.php)

The page template offers:

  • Extension of the layout template
  • SEO section configuration
  • Content area for page-specific content
  • Debug output for development

PHP Layout Component (layout.php)

Laravel Blade component for flexible template usage in Livewire or other Laravel components.

SEO Features

The layout template supports extensive SEO functionality:

@section('title', 'Page Title')
@section('description', 'Page Description')
@section('keywords', 'Keywords')
@section('og_type', 'website')
@section('og_image', asset('image/logo.png'))
@section('robots', 'index, follow')

Vite Integration

The template is prepared for Laravel Vite:

@vite(['resources/css/app.css', 'resources/js/app.js'])

JavaScript Features

  • Hash anchor navigation: Automatic scrolling to hash links
  • Scroll to element: window.scrollToElement(idName) function

Developed for

  • Laravel

License

MIT - see LICENSE file for details.

Support

For questions or issues visit componist.dev.

Developed by Componist - Modern Laravel Tools for Developers

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-03