restaurant menu from database

hello everyone,

please, if it’s possible i want to display a menu based on a table named categories and when i click on a category the menu hides and it shows all the products of the category selected and each product has a +/- button to add/remove from a cart, and it has a return button to return to the original menu (categories).

please help me, i am new at yii, if there is any way to do this because i want this application to be a phone application.

and i’m sorry for my bad english


Is it possible? Yes it is.

Regarding everything else my honest opintion:

What do you expect as answer?

That people tell you: "Click here and there and it is done"?

Please don’t take following as offense…

But I’m pretty sure, the fact that & how you ask this question will lead to no useful answers.

It is like asking:

I want to build a car. It should have some kind of pedal to speed up and slow down.

Also it should have some knob on each side to get in and out.

Please help me. I’m new to car manufacturing. Is it possible?

Because I want to drive my car on the freeway!

Sorry when this sounds rude but like I said - just my honest opinion.

If I’m wrong with above and you are experienced in coding (at least in PHP & JQuery)

and you’re interested in learning Yii read following things:

The Yii2 Guide:

Composer Guide:

Bootstrap Guide:

After that - start your project and see how far you can get…

Then ask specific questions when you get stuck and can’t solve it alone anymore.

But do not expect to get your wanted result done within some days or weeks.

Best Regards

Hi MetaCrawler,

thanks for you answer, i am not asking a complete application, but i just want an idea of what i can use to display the menu with yii2 because i can develop like this application with just php a jquery without any framework, but and i want to learn yii and there aren’t alot of topics in the the internet about this framework (and the documentation is little bit complicated), so i’m just asking for an idea or a link that might help.

and thank you for your replay and have a nice day.

@MorFe, unfortunately the Yii DOCs is your best friend. The Yii 2 manual is easier to understand them Yii 1.

If you folow the The Yii2 Guide:

You will learn as fast as possible. But you have pre-requisites. PHP OO, MVC architecture, Composer and decide what kind of projet you want a basic project (perfect for institutional sites, homepage and small and simple busines) or a advanced project (perfect to medium - large sites with complex rules, authentications, etc).

Basically yii is a component/widget based framework. In all almost your view you’ll see somethig like widget….

To helps you create a project, assuming if you know composer and already have installed composer and you build a simple site.


[*]Open your linux terminal

[*]run command: composer global require "fxp/composer-asset-plugin:~1.0.0" (you need do it only one time, even you need create any other projects later)

[*]run command: composer create-project --prefer-dist yiisoft/yii2-app-basic project_name


Now you can browser it, like localhost/your_project and you will see something like it Yii Running.

Follow this videos to learn about Yii2.

In the guide you will learn other things.

I hope that I help you understand a little bit Yii Framework.

Yes, the definitive guide. I do agree with @MetaCrawler and @Cálcio.

Since Yii 1.1.x, the definitive guide for Yii has been one of the best programming tutorials available on the planet. Too exaggerated? Maybe. But I’m quite sure that all the Yii lovers love the guide as much as they love the framework. (And also the comprehensive API reference.)

Even if you are not very familiar with OOP or MVC, there’s no need to worry about it. You’ll be sure to understand the core concepts of them by reading the guide. In fact, the guide can be considered as a good tutorial on the PHP web programming in general. It covers all the indispensable topics of the web programming like request, response, security, data validation, caching … and so on.

It’s true that it will cost you a little time and effort to read through the guide, especially when you are new to PHP frameworks, but it’s worth doing it.