Skip to content

Commit d25a485

Browse files
committed
take into account laravel's public folder setting
1 parent 1988f4d commit d25a485

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ That's it. You are now ready to start theming your applications!
4242

4343
## Defining themes
4444

45-
Simple define your themes in the `themes` array in `config/theme.php`. The format for every theme is very simple:
45+
Simple define your themes in the `themes` array in `config/themes.php`. The format for every theme is very simple:
4646

4747
```php
4848
// Select a name for your theme
@@ -59,7 +59,7 @@ Simple define your themes in the `themes` array in `config/theme.php`. The forma
5959

6060
// The path where the assets are stored
6161
// Defaults to 'theme-name'
62-
// It is relative to /public
62+
// It is relative to laravels public folder (/public)
6363
'asset-path' => 'path-to-assets', // defaults to: theme-name
6464

6565
// you can add your own custom keys and retrieve them with Theme::config('key')

src/Theme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function url($url){
2424

2525
$fullUrl = (empty($this->assetPath) ? '' : '/').$this->assetPath.'/'.ltrim($url, '/');
2626

27-
if (file_exists($fullPath = base_path('public').$fullUrl))
27+
if (file_exists($fullPath = public_path($fullUrl)))
2828
return $fullUrl;
2929

3030
if ($this->getParent())

0 commit comments

Comments
 (0)