sudo apt install letsencrypt
const express = require('express'),
app = express();
app.use(express.static(path.join(__dirname, 'static')));
app.get('/', (req, res) => res.send("I'm ALIVE!"));sudo apt install letsencrypt
const express = require('express'),
app = express();
app.use(express.static(path.join(__dirname, 'static')));
app.get('/', (req, res) => res.send("I'm ALIVE!"));| CODE: | |
| Branch::find() | |
| ->where(['id' => $id]) | |
| ->with(['branchcategories' => function($q) { | |
| $q->select(['id', 'name', 'branch_id', '(select COUNT(*) from branchitem where branchcategory_id=branchcategory.id AND status = ' . Branchitem::STATUS_ACTIVE . ') AS thecount'])->where(['status' => Branchcategory::STATUS_ACTIVE])->having('thecount > 0'); | |
| }])->with(['branchcategories.branchitems' => function($q) { | |
| $q->select(['id', 'name', 'description', 'price', 'branchcategory_id'])->where(['status' => Branchitem::STATUS_ACTIVE]); | |
| }]) | |
| ->with(['branchcategories.branchitems.branchitempictures' => function($q) { | |
| $q->select(['id', 'src_thumb', 'restoitem_id'])->orderBy("id desc")->limit(1); |