What is the best way to create blog within Aimeos?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
D-Cell
Posts: 23
Joined: 17 Dec 2018, 17:47

What is the best way to create blog within Aimeos?

Post by D-Cell » 21 Jan 2019, 17:40

Hello! I`m thinking about to create a blog for my Aimeos website, so i would like to ask - which way is the best?

Should i create a simple CRUD as i usually do with laravel and extend my views with aimeos views? If so, than how to integrate such blog into Aimeos admin panel?

Or, may be, there is some other way?

Thank you! ;)

D-Cell
Posts: 23
Joined: 17 Dec 2018, 17:47

Re: What is the best way to create blog within Aimeos?

Post by D-Cell » 22 Jan 2019, 08:14

Sorry! I forgot to provide info about my environment.
I work with Linux Fedora 28, PHP 7.2.13, Mariadb 10.2.19, Nginx. Laravel 5.7.18 and Aimeos 2018.10.3

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: What is the best way to create blog within Aimeos?

Post by aimeos » 22 Jan 2019, 13:11

The requirements of a blog are very different from a shop so Aimeos won't help you much. You should check if there's any Laravel blog package that fulfills your needs or your take a look at that one: https://cms.grafite.ca/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

D-Cell
Posts: 23
Joined: 17 Dec 2018, 17:47

Re: What is the best way to create blog within Aimeos?

Post by D-Cell » 22 Jan 2019, 14:00

aimeos wrote:The requirements of a blog are very different from a shop so Aimeos won't help you much. You should check if there's any Laravel blog package that fulfills your needs or your take a look at that one: https://cms.grafite.ca/
Hello! Thank you for reply! Now i`m writing my own simple blog based on simple Laravel CRUD - just one model, resource controller and view files for actions. The only thing i can`t figure is how to extend the view blade files of my blog with Aimeos layout. In other words - i need my "addpost" and "edit post" pages to be part of Aimeos admin panel with Aimeos header, footer and menu.

Could you be so kind to give me some advice about it?
Thank you.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: What is the best way to create blog within Aimeos?

Post by aimeos » 23 Jan 2019, 14:49

For the frontend, you can use the app.blade.php file you've created for Aimeos. Either extend from that file or assign the rendered blog to the view property named "content".

For the backend, you can add a new Aimeos admin client that implements create/search/save methods like this one:
https://github.com/aimeos/ai-admin-jqad ... QAdm/Group
You can use the Laravel facades and methods to work with e.g. Eloquent models.

Then, you have to add it to the navigation bar (insert the content in your ./config/shop.php into the "admin" section with "jqadm" => ["navbar" => ...] sub-array):
https://github.com/aimeos/ai-admin-jqad ... navbar.php

and configure permissions in your ./config/shop.php with:

Code: Select all

'admin' => [
    'jqadm' => [
        'resource' => [
            'blog' => [ // that's the name of your client, e.g. Admin\JQAdm\Blog
                'groups' => ['editor', 'admin', 'super'],
        ],
    ],
],
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

D-Cell
Posts: 23
Joined: 17 Dec 2018, 17:47

Re: What is the best way to create blog within Aimeos?

Post by D-Cell » 23 Jan 2019, 17:51

aimeos wrote:For the frontend, you can use the app.blade.php file you've created for Aimeos. Either extend from that file or assign the rendered blog to the view property named "content".

For the backend, you can add a new Aimeos admin client that implements create/search/save methods like this one:
https://github.com/aimeos/ai-admin-jqad ... QAdm/Group
You can use the Laravel facades and methods to work with e.g. Eloquent models.

Then, you have to add it to the navigation bar (insert the content in your ./config/shop.php into the "admin" section with "jqadm" => ["navbar" => ...] sub-array):
https://github.com/aimeos/ai-admin-jqad ... navbar.php

and configure permissions in your ./config/shop.php with:

Code: Select all

'admin' => [
    'jqadm' => [
        'resource' => [
            'blog' => [ // that's the name of your client, e.g. Admin\JQAdm\Blog
                'groups' => ['editor', 'admin', 'super'],
        ],
    ],
],

Thank you! Thanks a lot! This is exactly what i was trying to find out!

Post Reply