pingpong-labs / themes

Laravel 5 Themes
https://pingpong-labs.github.io/docs/themes.html
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

Register view location of theme. #10

Closed mahmutbayri closed 9 years ago

mahmutbayri commented 9 years ago

This method allows to use view name without view namespace. Views files dont have to know which theme is activated.

Example view in any module or default resource/views folder.

@extends('layouts.master')

@section('content')
    content
@endsection

'layouts.master' view will be search in default resource/view/layouts folder and active theme view/layouts folder.

To active this feature, run Theme::registerViewLocation() in where you need.

mahmutbayri commented 9 years ago

You can use also use laravel native view function after registering view folder of active theme.

view('pingphong.themetest') and Theme::view('pingphong.themetest') will be same.