fbf/laravel-panels 问题修复 & 功能扩展

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

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

fbf/laravel-panels

Composer 安装命令:

composer require fbf/laravel-panels

包简介

A Laravel 4 package for adding multiple types of widgets like carousels, accordions and tabsets to a website

README 文档

README

A Laravel 4 package for adding multiple types of widgets like carousels, accordions and tabsets to a website

Features

  • Supports concept of panels to be used in an accordion or a carousel or a set of tabs.
  • Each panel can have title, description, link URL, link text and up to 2 images. E.g. a background and an icon image.
  • You can define multiple types, or multiple instances of each type to be used on you site.
  • Bundled FrozenNode/Administrator config files to manage the panel data, including custom actions for reordering. One for an accordion and one for a carousel, but you could make your own
  • Bundled views that you can include as a partial for example on your site's homepage, and a model method for getting all the data to populate those views.
  • Bundled faker seed that populates your table with fake data, useful for testing

Installation

Add the following to you composer.json file

"fbf/laravel-panels": "dev-master"

Run

composer update

Add the following to app/config/app.php

'Fbf\LaravelPanels\LaravelPanelsServiceProvider'

Publish the config

php artisan config:publish fbf/laravel-panels

Before running the migration, ensure you set up the 'types' you need in your app, in the config file that's been published into your app's config folder.

Run the migration

php artisan migrate --package="fbf/laravel-panels"

Create the relevant image upload directories that you specify in your config, e.g.

public/uploads/packages/fbf/laravel-panels/homepage_carousel/image_1/original
public/uploads/packages/fbf/laravel-panels/homepage_carousel/image_1/resized
public/uploads/packages/fbf/laravel-panels/homepage_carousel/image_2/original
public/uploads/packages/fbf/laravel-panels/homepage_carousel/image_2/resized
public/uploads/packages/fbf/laravel-panels/homepage_accordion/image_1/original
public/uploads/packages/fbf/laravel-panels/homepage_accordion/image_1/resized
public/uploads/packages/fbf/laravel-panels/homepage_accordion/image_2/original
public/uploads/packages/fbf/laravel-panels/homepage_accordion/image_2/resized

Optionally change the dimensions of the images you want to use in the config file.

Optionally run the faker seed

php artisan db:seed --class=Fbf\LaravelPanels\PanelsTableFakeSeeder

Usage

In your controller

$carouselPanels = Fbf\LaravelPanels\Panel::getData('HOMEPAGE_CAROUSEL');
$accordionPanels = Fbf\LaravelPanels\Panel::getData('HOMEPAGE_ACCORDION');
return View::make('home')->with(compact('carouselPanels', 'accordionPanels'));

In your blade template:

@include('laravel-panels::carousel', array('panels' => $carouselPanels))
...
@include('laravel-panels::accordion', array('panels' => $accordionPanels))

Administrator

You can use the excellent Laravel Administrator package by frozennode to administer your carousels, accordions and tabsets.

http://administrator.frozennode.com/docs/installation

Two ready-to-use sample model config files for the Panel model (homepage_carousel.php and homepage_accordion.php) are provided in the src/config/administrator directory of the package, which you can copy into the app/config/administrator directory (or whatever you set as the model_config_path in the administrator config file).

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-02-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固