Skip to content

Instantly share code, notes, and snippets.

postsQueryable =
context.Posts
.Include(x => x.Section)
.Include(x => x.PostTags).ThenInclude(x => x.Tag)
.Where(x => x.IsPublished)
.Select(x => new Post
{
Title = x.Title,
Slug = x.Slug,
Cover = x.Cover,
const path = require('path');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = function (env) {
env = env || {};
var isProd = env.NODE_ENV === 'production';
use yii\widgets\Pjax;
use yii\widgets\PjaxAsset;
PjaxAsset::register($this);
$this->registerJs(<<<JS
$(document).on('change', '#provider', function(e) {
$.pjax({
timeout: 4000,
url: $('#filter-form').attr('action'),
container: '#list-view',