igaster / laravel-theme

Theme support for Laravel
MIT License
516 stars 110 forks source link

Update Themes.php #75

Closed SolStis86 closed 6 years ago

SolStis86 commented 6 years ago

Replaced FileViewFinder::setPaths with new logic for updated method addLocation

lvkins commented 6 years ago

This will break the view search paths. In the end, view path auto-detection will not work:

Example for theme 'admin':

array:3 [▼
  0 => "C:\wamp64\www\app\resources\views"
  1 => "C:\wamp64\www\app\resources\views"
  2 => "C:\wamp64\www\app\resources\views"
]

Instead of

array:2 [▼
  0 => "C:\wamp64\www\app\resources\themes/admin"
  1 => "C:\wamp64\www\app\resources\views"
]

Be careful.

igaster commented 6 years ago

Exactly,

also the order of the paths is important, default laravel paths should be pushed in the end so that theme paths will take precedence