Skip to content

Commit

Permalink
take into account laravel's public folder setting
Browse files Browse the repository at this point in the history
  • Loading branch information
igaster committed Jun 22, 2015
1 parent 1988f4d commit d25a485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ That's it. You are now ready to start theming your applications!

## Defining themes

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

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

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

// you can add your own custom keys and retrieve them with Theme::config('key')
Expand Down
2 changes: 1 addition & 1 deletion src/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function url($url){

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

if (file_exists($fullPath = base_path('public').$fullUrl))
if (file_exists($fullPath = public_path($fullUrl)))
return $fullUrl;

if ($this->getParent())
Expand Down

0 comments on commit d25a485

Please sign in to comment.