本文整理汇总了PHP中Theme::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Theme::view方法的具体用法?PHP Theme::view怎么用?PHP Theme::view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Theme
的用法示例。
在下文中一共展示了Theme::view方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getReset
public function getReset($token = null)
{
if (is_null($token)) {
throw new NotFoundHttpException();
}
return \Theme::view('auth.recover')->with('token', $token);
}
示例2: show
public function show($id)
{
$course = $this->course->with(['modules'])->findBySlugOrIdOrFail($id);
$modules = $course->modules;
$courses = $this->course->all();
$sharer = \Share::load(route('learning.course.show', $course->slug), trans('course::show.messages.sharer', ['name' => $course->name]))->services('facebook', 'gplus', 'twitter');
return \Theme::view('courses/learning/show', compact('course', 'modules', 'sharer', 'courses'));
}
示例3: show
public function show($id)
{
$lesson = $this->lesson->findBySlugOrIdOrFail($id);
$courses = $this->course->all();
if (!$lesson->view) {
\Auth::user()->lessons()->attach($lesson->id);
\Auth::user()->points += 10;
\Auth::user()->save();
}
if ($lesson->type == 1) {
$video = $lesson->resource;
return \Theme::view('lessons/learning/video', compact('lesson', 'courses', 'video'));
} else {
return \Theme::view('lessons/learning/letter', compact('lesson', 'courses'));
}
}
示例4: array
<?php
$pageName = 'home';
$pageData = array();
$pageData['content_top'] = Render::content_top($pageName);
$pageData['content_left'] = Render::content_left($pageName);
$pageData['content_right'] = Render::content_right($pageName);
$pageData['content_bottom'] = Render::content_bottom($pageName);
Theme::model('search');
$headData = GlobalCMS::$setting;
// $pageData['categories']=categories();
$keyword = '';
$pageData['newPost'] = searchResult();
$parseData = listPage();
$pageData['listPage'] = $parseData['pages'];
$pageData['keywords'] = $parseData['keywords'];
Theme::view('head', $headData);
Theme::view('search', $pageData);
Theme::view('footer');
示例5: function
/**
* Created by Miki Maine Amdu.
* For : INNOVATE E-COMMERCE
* User: MIKI$
* Date: 6/22/2016
* Time: 9:45 PM.
*/
\Component::register('category', function () {
return \Theme::view('includes.partials._category');
});
\Component::register('sellers', function () {
return \Theme::view('includes.partials._sellers');
});
\Component::register('shopping_cart', function () {
return \Theme::view('includes.partials._shopping_cart');
});
\Component::register('google_analytics', function () {
return \Theme::view('includes.partials.ga');
});
\Component::register('search', function () {
return \Theme::view('includes.partials.search');
});
\Component::register('tags', function () {
return \Theme::view('includes.partials._tags');
});
\Component::register('cart_summary', function () {
return \Theme::view('includes.partials._cart_summary');
});
\Component::register('shipping_calculator', function () {
return \Theme::view('includes.partials._shipping_calculator');
});
示例6: function
Route::pattern('post', '[0-9]+');
Route::pattern('user', '[0-9]+');
Route::pattern('role', '[0-9]+');
Route::pattern('token', '[0-9a-z]+');
*/
// set pattern for overall
Route::pattern('id', '[0-9]+');
Route::pattern('lang', '[0-9a-z]+');
/*
|--------------------------------------------------------------------------
| Main
|--------------------------------------------------------------------------
*/
// Controllers
Route::get('/', function () {
return Theme::view('welcome');
});
Route::get('/language/{lang}', 'LanguageController@language');
// Resources
// API DATA
/*
|--------------------------------------------------------------------------
| Admin
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'admin'], function () {
Route::pattern('id', '[0-9]+');
// Resources
// Controllers
// API DATA
});
示例7: function
Route::post('/deleted', 'Admin\\PostsController@getDeletedPosts');
// Create new Post/Draft
Route::get('/new', function () {
return Theme::view('admin.posts.new');
});
Route::post('/new', 'Admin\\PostsController@createPost');
// Update current Post/Draft
Route::get('/update/{id}', 'Admin\\PostsController@getPostToUpdate');
Route::post('/update/{id}', 'Admin\\PostsController@updatePost');
// Delete a post softly or permanently depending on list its being deleted from.
Route::delete('/delete/{id}', 'Admin\\PostsController@deletePost');
});
});
// Authentication (no registration or activation, only admins can create users)
Route::get('/login', function () {
return Theme::view('admin.auth.login');
});
Route::post('/login', 'Auth\\AuthController@login');
Route::any('/logout', 'Auth\\AuthController@logout');
});
/*
* Util Routes
*/
Route::get('/manifest', 'UtilController@manifest');
/*
* Post them selves and home page must come last.
*/
Route::get('/', 'PostsController@getAll');
// Get a post of a certain category
Route::get('/category/{category}', 'PostsController@getCategories');
Route::get('/author/{username}', 'PostsController@getAuthor');
示例8: layoutPreview
/**
* Render a cleaned and formatted layout preview
*
* @param string $layout
* @param string $checked_zone [description]
* @param bool $print_name
* @return string
*/
public function layoutPreview($layout, $print_name = true, $checked_zone = null)
{
$layout_view = \Theme::view('layouts.' . $layout);
$layout_zones = \Theme::layout($layout);
// Loop layout zones and set name and partials.layout.zone for each
foreach ($layout_zones as $zone => $name) {
$zone_name = $print_name ? 'zonename' : 'zoneempty';
$zone_content[$zone] = $this->view('partials.layout.' . $zone_name);
$zone_content[$zone]['checked_zone'] = $checked_zone;
$zone_content[$zone]['name'] = st('settings.layout.' . $layout . '.' . $zone, $name);
$zone_content[$zone]['value'] = $zone;
$layout_view[$zone] = st('settings.layout.' . $layout . '.' . $zone, $name);
}
// Strip all attributes from layouts but div
$layout_view = strip_tags($layout_view, '<div>');
$attrib_to_remove = array('class', 'id', 'rel');
$classes_to_take = $this->getBootstrapClasses();
// Remove unwanted attributes and create array of present classes
foreach ($attrib_to_remove as $attrib) {
$attrib_values = \Tool::getAllAttributes($attrib, $layout_view);
if (!empty($attrib_values)) {
foreach ($attrib_values as $value) {
if ($attrib != 'class') {
// Remove attributes but classes
$layout_view = str_replace(' ' . $attrib . '="' . $value . '"', '', $layout_view);
} else {
// Put css values in array
$css_values[] = $value;
}
}
}
}
// Normalize classes in one string and array them
$css_string = implode(' ', $css_values);
$css_array = explode(' ', $css_string);
// Loop classes and remove not Bootstrap classes
foreach ($css_array as $css_class) {
if (!in_array($css_class, $classes_to_take)) {
$layout_view = trim(str_replace($css_class, '', $layout_view));
}
}
// Replace title with partials.layout.zone
foreach ($layout_zones as $zone => $name) {
$layout_view = str_replace(st('settings.layout.' . $layout . '.' . $zone, $name), $zone_content[$zone]->render(), $layout_view);
}
$view = $this->view('partials.layout.overall');
$view['layout'] = $layout_view;
return $view;
}
示例9: array
<?php
if ((int) GlobalCMS::$setting['enable_rss'] == 0) {
Alert::make('Page not found');
}
$pageName = 'rss';
$pageData = array();
$headData = GlobalCMS::$setting;
Theme::model('rss');
$pageData['listPost'] = listRss();
$pageData['setting'] = $headData;
Theme::view($pageName, $pageData);
示例10: admin
public function admin(PrincipalMenu $principal)
{
return \Theme::view('dashboard.admin', compact('principal'));
}
示例11: getSlug
/**
* Get a single post
* @param $year
* @param $month
* @param $slug
* @return \Theme
*/
public function getSlug($year, $month, $slug)
{
if (Posts::whereSlug($slug)->whereYear('created_at', '=', $year)->whereMonth('created_at', '=', $month)->where('published_at', '!=', null)->exists()) {
if (!\Cache::has('posts-' . $year . '-' . $month . '-' . $slug)) {
$post = Posts::whereSlug($slug)->whereYear('created_at', '=', $year)->whereMonth('created_at', '=', $month)->where('published_at', '!=', null)->first();
\Cache::put('posts-' . $year . '-' . $month . '-' . $slug, $post, 5);
} else {
$post = \Cache::get('posts-' . $year . '-' . $month . '-' . $slug);
}
return \Theme::view('blog.single', ['post' => $post]);
} else {
return abort(404);
}
}
示例12: show
public function show()
{
return \Theme::view('admin.user.form_change_password');
}
示例13: getPostToUpdate
public function getPostToUpdate($id)
{
$post = Posts::whereId($id)->first();
return \Theme::view('admin.posts.update', ['post' => $post]);
}
示例14: getChangePassword
/**
* @return \Illuminate\View\View
*/
public function getChangePassword()
{
return \Theme::view('auth.change-password');
}
示例15: getRegister
public function getRegister(CountryRepository $country)
{
$countries = $country->all(['id', 'short_name']);
return \Theme::view('auth.register', compact('countries'));
}