2017 © Pedro Peláez
 

library component

Component is used to separate small parts from the main view and still works perfectly.

image

teepluss/component

Component is used to separate small parts from the main view and still works perfectly.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Laravel 5 Component

Component is used to separate small parts from the main view and still works perfectly., (*1)

Installation

Composer

To get the latest version of Theme simply require it in your composer.json file., (*2)

"teepluss/component": "dev-master"

You'll then need to run composer update to download it and have the autoloader updated., (*3)

Laravel

In your config/app.php add 'Teepluss\Component\ComponentServiceProvider' to the end of the providers array:, (*4)

'providers' => [
    ...
    'Teepluss\Component\ComponentServiceProvider',
]

Publish Configuration, (*5)

php artisan vendor:publish --provider="Teepluss\Component\ComponentServiceProvider"

Usage

Create a Component

Using artisan CLI to create a component, then you can found your component into app/Components., (*6)

php artisan component:make LiveChatBox

The command will generate a structure like this:, (*7)

root
|- app
|--- Components
|----- LiveChatbox
|------- assets
|--------- css
|------------ style.css
|--------- img
|--------- js
|------------ script.js
|------- lang
|--------- en
|------------ messages.php
|------- views
|--------- index.blade.php
|------- LiveChatbox.php
|----- gulp.js

Render a component.

{!! component()->uses('LiveChatBox', ['args' => '1'])->render() !!}

Working with assets.

Install gulp, (*8)

npm install gulp

Using gulp to publish component assets., (*9)

$ cd app/Components/
$ gulp
$ gulp watch

Render all component scripts and styles from the main layout, (*10)

// Display component scripts and styles.
{!! component()->scripts() !!}
{!! component()->styles() !!}

// Locate to asset path.
{!! component()->uses('LiveChatBox')->asset('img/someimage.png') !!}

Translation, (*11)

{!! component()->trans('message') !!}

Support or Contact

If you have some problem, Contact teepluss@gmail.com, (*12)

Support via PayPal, (*13)

The Versions

28/07 2015

dev-master

9999999-dev https://github.com/teepluss/laravel-component

Component is used to separate small parts from the main view and still works perfectly.

  Sources   Download

MIT

The Requires

 

laravel component widget asset layout

28/07 2015

1.0.1

1.0.1.0 https://github.com/teepluss/laravel-component

Component is used to separate small parts from the main view and still works perfectly.

  Sources   Download

MIT

The Requires

 

laravel component widget asset layout

10/06 2015

1.0.0

1.0.0.0 https://github.com/teepluss/laravel-component

Component is used to separate small parts from the main view and still works perfectly.

  Sources   Download

MIT

The Requires

 

laravel component widget asset layout