CREATE TABLE IF NOT EXISTS "user"();
class Category{
...
public function description(){
return $this->hasOne(CategoryDesc::class);
}
...
}
$category = Category::create([
'image' => $image,
'parent_id' => $request->input('parent_id'),
'status' => $request->input('status'),
'sort_order' => isset($sort_order) ? $sort_order : '0'
]);
$category->description()->create([
'language_id' => $language->language_id,
'name' => $request->input($name),
'meta_title' => $request->input($meta_title),
'meta_description' => $request->input($meta_description)
]);
select
*
from
actors
where (
SELECT
count(*)
FROM
filters
WHERE
((property_val_id = 8 and property_id = 3) or
(property_val_id = 8 and property_id = 15) or
(property_val_id = 10 and property_id = 18))
and
actor_id = actors.id) = 3;
select * from actors order by (SELECT count(*) FROM filters WHERE ((property_val_id = 8 and property_id = 3) or (property_val_id = 8 and property_id = 15) or (property_val_id = 10 and property_id = 18)) and actor_id = actors.id) desc;
[{"jsonrpc":"2.0","method":"user.login","params":{"user":"login","password":"pass,"expire":"never","auth_token":"sessionless:1665054000:/__api/::da781179f94e8167b7dbc0890122217a37e155cc"},"id":19}]