<commit_before>Laravel Themes
===============

- [Installation](#installation)
- [Usage](#usage)

<a name="installation"></a>
## Installation

Open your composer.json file, and add the new required package.
```
   "pingpong/themes": "2.0.*@dev"
```
Next, open a terminal and run.
```
composer update
```

Next, Add new service provider in `config/app.php`.

```php
  'Pingpong\Themes\ThemesServiceProvider',
```

Next, Add new aliases in `app/config/app.php`.

```php
   'Theme' => 'Pingpong\Themes\ThemeFacade',
```

Next, publish the asset. The asset is an example theme.
```
php artisan vendor:publish
```

Done.

<a name="usage"></a>
## Usage

Get all themes.
```php
Theme::all();
```

Set theme active.
```php
Theme::set('default');

Theme::setCurrent('default');
```

Get current theme active.
```php
Theme::getCurrent();
```

Check theme.
```php
Theme::has('simple')

Theme::exists('other-theme');
```

Set theme path.
```php
$path = public_path('themes');

Theme::setPath($path);
```

Get theme path.
```php
Theme::getThemePath('default');
```

Get themes path.
```php
Theme::getPath();
```

Get view from current active theme.
```php
Theme::view('index');

Theme::view('folders.view');
```

Get config from current active theme.
```php
Theme::config('group.name');
```

Get lang from current active theme.
```php
Theme::lang('group.name');
```<commit_msg>update themes doc<commit_after>Laravel Themes
===============

- [Installation](#installation)
- [Usage](#usage)
- [Artisan Commands](#artisan-commands)

<a name="installation"></a>
## Installation

Open your composer.json file, and add the new required package.
```
   "pingpong/themes": "2.0.*@dev"
```
Next, open a terminal and run.
```
composer update
```

Next, Add new service provider in `config/app.php`.

```php
  'Pingpong\Themes\ThemesServiceProvider',
```

Next, Add new aliases in `app/config/app.php`.

```php
   'Theme' => 'Pingpong\Themes\ThemeFacade',
```

Next, publish the asset. The asset is an example theme.
```
php artisan vendor:publish
```

Done.

<a name="usage"></a>
## Usage

Get all themes.
```php
Theme::all();
```

Set theme active.
```php
Theme::set('default');

Theme::setCurrent('default');
```

Get current theme active.
```php
Theme::getCurrent();
```

Check theme.
```php
Theme::has('simple')

Theme::exists('other-theme');
```

Set theme path.
```php
$path = public_path('themes');

Theme::setPath($path);
```

Get theme path.
```php
Theme::getThemePath('default');
```

Get themes path.
```php
Theme::getPath();
```

Get view from current active theme.
```php
Theme::view('index');

Theme::view('folders.view');
```

Get config from current active theme.
```php
Theme::config('group.name');
```

Get lang from current active theme.
```php
Theme::lang('group.name');
```

<a name="artisan-commands"></a>
## Artisan Commands

Show all available themes.

```
php artisan theme:list
``

Cache all themes.

```
php artisan theme:cache
```

Publish all theme's assets.

```
php artisan theme:publish
```

Publish all theme's assets from the specified theme.

```
php artisan theme:publish theme-name
```
{'fraction_non_alphanumeric': 0.20451612903225808, 'fraction_numerical': 0.0012903225806451613, 'mean_word_length': 5.092337917485265, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3460396', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1034, 'n_words': 292}