Download the PHP package yaap/theme without Composer

On this page you can find all versions of the php package yaap/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 support for Laravel

Inspired by bigecko/laravel-theme. Themes are stored inside default laravel's resources folder

Introduction

This package provides a simple way to manage themes in Laravel applications.

For example, you can develop multiple themes for your application and easily switch between themes for different purposes.

Requirements

This version requires PHP 8.1 and supports Laravel 10-11.

This package also provides support for Laravel Mix and Vite configurations.

Themes L5.5 L5.6 L5.7 L5.8 L6 L7 L8 L9 L10 L11
2.4 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x: :x: :x: :x:
3.0 :x: :x: :x: :x: :white_check_mark: :x: :x: :x: :x: :x:
4.1 :x: :x: :x: :x: :x: :x: :white_check_mark: :white_check_mark: :white_check_mark: :x:
5.0 :x: :x: :x: :x: :x: :x: :x: :x: :white_check_mark: :x:
5.1 :x: :x: :x: :x: :x: :x: :x: :x: :white_check_mark: :white_check_mark:

Installation

To get the latest version, simply require the project using Composer:

or manually add line to composer.json

Optionally, publish config using artisan CLI (if you want to overwrite default config).

Configuration

Package config

Config in config/theme.php file.

Theme config

Config in theme folder. Placeholder %theme_name% will be replaced with theme name on creation.

Usage

Create theme with artisan CLI

Create command

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

By default, it will use vite as assets builder. If you want to use laravel mix instead, use the command:

or with laravel mix:

Destroy command

To delete an existing theme, use the command:

Structure

Here is an example of the folder structure of project with theme

Init theme

To init and use theme in your application, add the following code to any boot method in application service provider (e.g. AppServiceProvider):

This will add to views find path:

Lang files will be added as well:

Making view

Laravel: Creating & Rendering Views

Assets

Vite

If you use Vite, ensure vite.config.js have specified the input path for theme

Because app.js includes app.scss you can use the following code to include assets in your views:

Laravel Mix

If you use Laravel Mix, ensure webpack.mix.js have specified mix configuration for theme

Then you can use the following code to include assets in your views:

in the <head> tag

and before </body> tag

To use images, you can use the following code:

Building layouts

Layouts using Components

Laravel: Blade Components

Layouts using template inheritance

To build layouts we use template inheritance. You can use @extends directive to specify a parent layout.

Fallback capability

You still able to use default View::make('emails.notify') which is stored outside the themes directory.

Can I hire you guys?

Yes! Say hi: [email protected]

We will be happy to work with you! Other work we’ve done

Follow us

Stay up to date with the latest news! Follow us on LinkedIn or Facebook

License

MIT license.


All versions of theme with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0 | ^11.0
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 yaap/theme contains the following files

Loading the files please wait ....