A
A
Andrew Kolomiets2020-12-16 15:39:17
Google Chrome
Andrew Kolomiets, 2020-12-16 15:39:17

How do I get "Offline App" status for my extension in the Chrome Extension Store?

How do I get "Offline App" status for my extension in the Chrome Extension Store?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander +, 2020-01-03
@Coolam

offline_enabled in the manifest.

V
Vlad, 2017-01-17
@wagwandude

Hey! Let's go in order :)
1. Since you have a many-to-many relationship (if this is not the case, it will be different), then you correctly made the third plate. You don't need to make a model for it! The relationship will look like this:
Category Model: Category.php

protected $table = 'categories';
public function posts()
{
    return $this->belongsToMany('App\Models\Post', 'post_id', 'category_id);
}

Post Model: Post.php
protected $table = 'posts';
public function categories()
{
    return $this->belongsToMany('App\Models\Category', 'post_id', 'category_id);
}

2. To work with post categories (and vice versa):
$post = Post::where('slug', $slug)->first();  -----> равенство идет по дефолту
$categories = $post->categories;
foreach ($categories as $category)
{
    echo $category->id. '<br>';   -----------------> любые данные категории.
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question