本文整理汇总了PHP中raw函数的典型用法代码示例。如果您正苦于以下问题:PHP raw函数的具体用法?PHP raw怎么用?PHP raw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了raw函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', 'Game' => 'game_id', trans('app.title') => 'title', trans('app.ip') => 'ip'], 'tableRow' => function ($server) {
$gameIcon = ($server->game and $server->game->icon) ? HTML::image($server->game->uploadPath() . $server->game->icon, $server->game->title) : null;
return [$server->id, raw($gameIcon), raw(Hover::modelAttributes($server, ['creator'])->pull(), $server->title), $server->ip];
}]);
}
示例2: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($tournament) {
Hover::modelAttributes($tournament, ['icon', 'creator']);
return [$tournament->id, raw(Hover::pull(), $tournament->title)];
}]);
}
示例3: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.category') => 'teamcat_id'], 'tableRow' => function ($team) {
Hover::modelAttributes($team, ['image', 'access_counter', 'creator']);
return [$team->id, raw($team->published ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link('teams/' . $team->id . '/' . $team->slug, $team->title)), $team->teamcat->title];
}]);
}
示例4: index
public function index()
{
$this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'downloadcat_id'], 'tableRow' => function ($download) {
Hover::modelAttributes($download, ['access_counter', 'creator']);
return [$download->id, raw(Hover::pull() . HTML::link('downloads/' . $download->id . '/' . $download->slug, $download->title)), $download->downloadcat->title];
}]);
}
示例5: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.provider') => 'provider'], 'tableRow' => function ($video) {
Hover::modelAttributes($video, ['creator']);
return [$video->id, raw(Hover::pull(), $video->title), Video::$providers[$video->provider]];
}]);
}
示例6: index
public function index()
{
$this->indexPage(['searchFor' => ['leftTeam', 'title'], 'tableHead' => [trans('app.id') => 'id', trans('app.state') => 'state', trans('matches::left_team') => 'left_team_id', trans('matches::right_team') => 'right_team_id', trans('app.object_tournament') => 'tournament_id', trans('matches::played_at') => 'played_at'], 'tableRow' => function ($match) {
Hover::modelAttributes($match, ['access_counter', 'creator']);
return [$match->id, raw($match->state == 1 ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link('matches/' . $match->id, $match->left_team->title)), raw(HTML::link('matches/' . $match->id, $match->right_team->title)), $match->tournament->short, $match->played_at];
}]);
}
示例7: finish
/**
* Fiinish a process
*
* @param $is_completed
* @param null $message
* @return $this
*/
public function finish($is_completed)
{
$this->is_completed = $is_completed;
$this->duration = raw('TIMESTAMPDIFF(SECOND, created_at, NOW())');
$this->finished_at = Carbon::now();
return $this;
}
示例8: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($gallery) {
Hover::modelAttributes($gallery, ['access_counter', 'creator']);
return [$gallery->id, raw(Hover::pull() . HTML::link('galleries/' . $gallery->id, $gallery->title))];
}]);
}
示例9: index
public function index()
{
$this->indexPage(['buttons' => ['new', 'category', 'config'], 'tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.author') => 'creator_id', trans('app.created_at') => 'created_at'], 'tableRow' => function ($news) {
Hover::modelAttributes($news, ['access_counter']);
return [$news->id, raw($news->published ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link(URL::route('news.show', [$news->id]), $news->title)), raw(HTML::link(URL::route('users.show', [$news->creator->id]), $news->creator->username)), $news->created_at];
}]);
}
示例10: index
public function index()
{
$this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'advertcat_id'], 'tableRow' => function ($advert) {
Hover::modelAttributes($advert, ['image', 'access_counter', 'creator']);
return [$advert->id, raw(Hover::pull(), $advert->title), $advert->advertcat->title];
}]);
}
示例11: index
public function index()
{
$this->indexPage(['buttons' => null, 'dataSource' => Module::findAll(), 'brightenFirst' => false, 'tableHead' => [trans('app.title') => null, trans('modules::enabled') => null, trans('app.state') => null], 'tableRow' => function ($module) {
if ($module->enabled()) {
$enabled = HTML::fontIcon('check');
} else {
$enabled = HTML::fontIcon('close');
}
/*
* Display if the module is installed
*/
$state = Cache::get(self::CACHE_KEY . $module->title, null);
if ($state === true) {
$state = trans('app.valid');
}
if ($state === false) {
$state = trans('app.invalid');
}
return [$module->title, raw($enabled), $state];
}, 'actions' => ['install', function ($module) {
if ($module->installer() !== false) {
return icon_link('plus-circle', trans('modules::install'), url('admin/modules/' . $module->title . '/install/0'), false, ['data-confirm' => trans('modules::installation')]);
}
}]]);
}
示例12: index
public function index()
{
$this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'slidecat_id'], 'tableRow' => function ($slide) {
Hover::modelAttributes($slide, ['image', 'creator']);
return [$slide->id, raw(Hover::pull(), $slide->title), $slide->slidecat->title];
}]);
}
示例13: index
public function index()
{
$this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.category') => 'partnercat_id'], 'tableRow' => function ($partner) {
Hover::modelAttributes($partner, ['image', 'access_counter', 'creator']);
return [$partner->id, raw($partner->published ? HTML::fontIcon('check') : null), raw(Hover::pull(), $partner->title), $partner->partnercat->title];
}]);
}
示例14: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.provider') => 'provider'], 'tableRow' => function ($stream) {
Hover::modelAttributes($stream, ['creator']);
return [$stream->id, raw(Hover::pull() . HTML::link('streams/' . $stream->id . '/' . $stream->slug, $stream->title)), Stream::$providers[$stream->provider]];
}]);
}
示例15: index
public function index()
{
$this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'teamcat_id'], 'tableRow' => function ($team) {
Hover::modelAttributes($team, ['image', 'access_counter', 'creator']);
return [$team->id, raw(Hover::pull(), $team->title), $team->teamcat->title];
}]);
}