本文整理汇总了PHP中Asset::push方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::push方法的具体用法?PHP Asset::push怎么用?PHP Asset::push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::push方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Display the specified permission.
*
* @param int $id
* @return Response
*/
public function show($id)
{
$permission = Permission::findOrFail($id);
if (!$permission->canShow()) {
return _access_denied();
}
if (Request::ajax()) {
return $permission;
}
Asset::push('js', 'show');
return View::make('permissions.show', compact('permission'));
}
示例2: foreach
<?php
View::share('currentuser', Auth::user());
Asset::push('js', 'application');
Asset::push('css', 'application');
if (Session::has('errors')) {
foreach (Session::get('errors')->all() as $message) {
Log::error($message);
}
}
View::addLocation(app_path() . '/base/views');
示例3: show
/**
* Display the specified reportgrouping.
*
* @param int $id
* @return Response
*/
public function show($report_id, $id)
{
$reportgrouping = ReportGrouping::findOrFail($id);
if (!$reportgrouping->canShow()) {
return $this->_access_denied();
}
if (Request::ajax()) {
return Response::json($reportgrouping);
}
$report = Report::findOrFail($report_id);
Asset::push('js', 'show');
return View::make('reportgroupings.show', compact('reportgrouping', 'report_id', 'report'));
}
示例4: show
/**
* Display the specified role.
*
* @param int $id
* @return Response
*/
public function show($id)
{
$role = Role::findOrFail($id);
if (!$role->canShow()) {
return $this->_access_denied();
}
if (Request::ajax()) {
return $role;
}
Asset::push('js', 'show');
return View::make('roles.show', compact('role'));
}
示例5: show
/**
* Display the specified reportfield.
*
* @param int $id
* @return Response
*/
public function show($report_id, $id)
{
$reportfield = ReportField::findOrFail($id);
$report = Report::findOrFail($report_id);
if (!$reportfield->canShow()) {
return $this->_access_denied();
}
if (Request::ajax()) {
return Response::json($reportfield);
}
Asset::push('js', 'show');
return View::make('reportfields.show', compact('report_id', 'report', 'reportfield'));
}
示例6: __construct
public function __construct()
{
parent::__construct();
View::share('controller', 'AuthController');
Asset::push('js', 'login');
Asset::push('css', 'login');
}
示例7: __construct
public function __construct()
{
parent::__construct();
Asset::push('js', 'reports.js');
Asset::push('css', 'reports.less');
}
示例8: show
/**
* Display the specified user.
*
* @param int $id
* @return Response
*/
public function show($id)
{
$user = User::findOrFail($id);
if (!$user->canShow()) {
return $this->_access_denied();
}
if (Request::ajax()) {
return $user;
}
Asset::push('js', 'show');
return View::make('users.show', compact('user'));
}