当前位置: 首页>>代码示例>>PHP>>正文


PHP Theme::view方法代码示例

本文整理汇总了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);
 }
开发者ID:lms-laravel,项目名称:user,代码行数:7,代码来源:PasswordController.php

示例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'));
 }
开发者ID:lms-laravel,项目名称:course,代码行数:8,代码来源:CourseController.php

示例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'));
     }
 }
开发者ID:lms-laravel,项目名称:course,代码行数:16,代码来源:LessonController.php

示例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');
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:19,代码来源:search.php

示例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');
});
开发者ID:mikimaine,项目名称:ecommerce,代码行数:31,代码来源:components.php

示例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
});
开发者ID:alexjberry,项目名称:rakkoII,代码行数:31,代码来源:routes.php

示例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');
开发者ID:tankerkiller125,项目名称:newscms,代码行数:31,代码来源:routes.php

示例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;
 }
开发者ID:pongocms,项目名称:cms,代码行数:57,代码来源:Render.php

示例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);
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:12,代码来源:rss.php

示例10: admin

 public function admin(PrincipalMenu $principal)
 {
     return \Theme::view('dashboard.admin', compact('principal'));
 }
开发者ID:lms-laravel,项目名称:dashboard,代码行数:4,代码来源:DashboardController.php

示例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);
     }
 }
开发者ID:tankerkiller125,项目名称:newscms,代码行数:21,代码来源:PostsController.php

示例12: show

 public function show()
 {
     return \Theme::view('admin.user.form_change_password');
 }
开发者ID:lms-laravel,项目名称:user,代码行数:4,代码来源:UserController.php

示例13: getPostToUpdate

 public function getPostToUpdate($id)
 {
     $post = Posts::whereId($id)->first();
     return \Theme::view('admin.posts.update', ['post' => $post]);
 }
开发者ID:tankerkiller125,项目名称:newscms,代码行数:5,代码来源:PostsController.php

示例14: getChangePassword

 /**
  * @return \Illuminate\View\View
  */
 public function getChangePassword()
 {
     return \Theme::view('auth.change-password');
 }
开发者ID:mikimaine,项目名称:ecommerce,代码行数:7,代码来源:PasswordController.php

示例15: getRegister

 public function getRegister(CountryRepository $country)
 {
     $countries = $country->all(['id', 'short_name']);
     return \Theme::view('auth.register', compact('countries'));
 }
开发者ID:lms-laravel,项目名称:user,代码行数:5,代码来源:AuthController.php


注:本文中的Theme::view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。