igaster / laravel-theme

Theme support for Laravel
MIT License
520 stars 113 forks source link

Added ability to render specific vendors from the root of theme +more #32

Closed hailwood closed 8 years ago

hailwood commented 8 years ago
  1. Added ability to render specific vendors from the root of theme rather than the vendor directory
  2. Hint path is now only prepended to the path array if the directory actually exists
  3. Added a new @jsIn() blade extension for setting the container
  4. Some general cleanups/typo fixes
  5. Documented in Readme changes from my last set of commits
  6. Added .idea folder to .gitignore.
codecov-io commented 8 years ago

Current coverage is 39.56%

Merging #32 into master will decrease coverage by 1.71%

@@             master        #32   diff @@
==========================================
  Files             6          6          
  Lines           206        225    +19   
  Methods          39         41     +2   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits             85         89     +4   
- Misses          121        136    +15   
  Partials          0          0          

Powered by Codecov. Last updated by 2b4b6af...1d494a5

hailwood commented 8 years ago

Hmm, either we need to remove the codecov report, or make the tests actually test some if the important stuff :D

igaster commented 8 years ago

You are right, codecov reports are confusing...

igaster commented 8 years ago

To keep the documentatin simpler, I've removed the description of 'vendor-as-root' from the introduction, and added a dedicated paragraph during the end. However I'm not sure that my description is accurate. You are free to check it and commit any changes! Thanks!

hailwood commented 8 years ago

@igaster ,

Almost correct, but it won't load from the VENDOR_NAME directory if VENDOR_NAME is a vendor-at-root.

i.e. view(VENDOR_NAME::main); will look in\path\to\theme\root\views\main.blade.php`. A use case is probably useful to explain this.

Imagine you have a theme for your forum - so when someone hit's the forum routes you have the middleware that sets the theme Theme::set('forum-dark')

I wouldn't want my structure to be \path\to\theme\root\views\vendor\forum\main.blade.php Likewise the same applies for that second level dead directory in this usecase - \path\to\theme\root\views\forum\main.blade.php. In this usecase I'm just after \path\to\theme\root\views\main.blade.php.