Download the PHP package pierresilva/laravel-themes without Composer

On this page you can find all versions of the php package pierresilva/laravel-themes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-themes

Laravel Themes

Laravel Themes gives the means to group together a set of views and assets for Laravel 5.3.

Quick Installation

Begin by installing the package through Composer.

`

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

Service Provider

Facade

Publishing The Config File

This will copy the bundled config file to config/themes.php

Configuration Options

Default Active Theme

Define the default active theme.

Folder Structure

Generating forlder structure from command line.

And fallow the instructions.

Manifest File

Each theme must come supplied with a manifest file (theme.json) stored at the root of the theme, which defines supplemental details about the theme.

Get Manifest Properties

Set Manifest Properties

Setting The Active Themes

Using The Config File

config/laravel-themes.php

Setting During Run-Time

app/Http/Controllers/Controller.php

Facade Reference

Theme::all()

Get all themes.

Returns

Collection

Example

Theme::setActive($theme)

Sets the active theme that will be used to retrieve view files from.

Parameters

$theme (string) Theme slug. Required

Returns

null

Example

Theme::getActive()

Returns the currently active theme.

Returns

string

Example

Theme::view($view, $data)

Renders the defined view. This will first check if the currently active theme has the requested view file; if not, it will fallback to loading the view file from the default view directory supplied by Laravel.

Parameters

$view (string) Relative path to view file. Required $data (mixed) Any additional data you'd like to pass along to the view file to be displayed.

Returns

View

Example

Theme::response($view, $data, $status, $headers)

Rendered the defined view in the same manner that Theme::view() does, but allows the means to set a custom status response and header for the rendered page.

Parameters

$view (string) Relative path to view file. Required $data (mixed) Any additional data you'd like to pass along to the view file to be displayed. $status (integer) HTTP status code. $header (array) HTTP headers.

Returns

Response

Example

Start building some awesome themes!

Let's say we have bootstrap theme in our application with the following structure: `

First, we need theme.json manifest file.

Please take note that we need to use Theme::asset() to load our theme asset files. The bootstrap is a theme slug defined in our theme.json file.

In our controller, load the view using the following code:

Now, for our login.blade.php:

Note that we are using @extends('bootstrap::layout') in our login view, where bootstrap is a theme slug defined in our theme.json and layout is our layout file.

Author

Pierre Silva

License

The Laravel Themes is open-sourced software licensed under the MIT license.


All versions of laravel-themes with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/support Version 5.3.*
illuminate/filesystem Version 5.3.*
illuminate/view Version 5.3.*
illuminate/config Version 5.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pierresilva/laravel-themes contains the following files

Loading the files please wait ....