Download the PHP package jasco-b/theme without Composer

On this page you can find all versions of the php package jasco-b/theme. 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 theme

Theme Management for Laravel

Laravel-Theme is a theme management for Laravel 5+, it is the easiest way to organize your skins, layouts and assets.

Usage

Theme has many features to help you get started with Laravel

Installation

'providers' => [
    ...
     \JascoB\Theme\Providers\ThemeServiceProvider::class,

]

Theme also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your config/app.php file.

'aliases' => [
    ...
    'Theme'=> \JascoB\Theme\Facades\Theme::class,

]

Publish config using artisan CLI.

php artisan vendor:publish --provider="JascoB\Theme\Providers\ThemeServiceProvider"

Create new theme

The first time you have to create theme "default" structure, using the artisan command:

php artisan theme:create default

This will create the following directory structure:

To delete an existing theme, use the command:

php artisan theme:delete default

If you want to list all installed themes use the command:

php artisan theme:list

You can duplicate an existing theme:

php artisan theme:duplicate name new-theme

Create from the application without CLI.

Artisan::call('theme:create', ['name' => 'foo']);

Basic usage

To display a view from the controller:

namespace App\Http\Controllers;

use Theme;

class HomeController extends Controller {

    public function getIndex()
    {
        return Theme::view('index');
    }
    ...
}

You can use it in your routes as a middleware

You can set theme manually:

...     
Theme::set('themename');

return Theme::view('index');
...

To check whether a theme exists.

Theme::has('themename');

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

{
    "name": "Default"
}

Custom Helper functions

@themeInclude is a blade directive for including sup views eg:

## insted of 
@include('someview', ['somedata'=>$var])

## use theme campatible
@themeInclude('someview', ['somedata'=>$var] )

@themeFirst is blade directive instead of @includeFirst

## insted of 
@includeFirst(['someview','view-other'], ['somedata'=>$var] )

## use theme campatible
@themeFirst(['someview','view-other'], ['somedata'=>$var] )

Package will publish assets folder to public folder as indicated on config file theme.php
In order to get url for current theme use theme_uri()

Please place all your assets to assets folder and Correctly change config/theme.php file

Custom theme boilerplate

if you want to change boilerplate you can use

php artisan vendor:publish --provider="JascoB\Theme\Providers\ThemeServiceProvider" --tag="template"

It will create a fonder on resources/views/vendor/theme/template you can make boilerplate there and The package will copy the template from there

Tests

In order to run test

php vendor/bin/phpunit tests

All versions of theme with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version >=5.8
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 jasco-b/theme contains the following files

Loading the files please wait ....