Draw lots and never worry about what to eat


Draw lots and never worry about what to eat


Get up in the morning and ask yourself: what do you have for breakfast?

Eleven o’clock, take out time, ask yourself: what’s for lunch?

After work at five, I went home to cook and asked myself: what’s for dinner?

At 10:30 in the evening, I was almost hungry again. I asked myself: what do you eat for supper?

A lot of times, when it’s time for dinner, we all start to struggle about what to eat, and it’s never solved. It’s a big headache

In order to help you solve this kind of selection difficulty, I suddenly made a lottery program, that is, if you don’t know what to eat, you can draw lots!

Project experience

Visiting address: http://food.y0701.com/

The project is divided into three pages, which are divided into 1 home page, 2 menu list and 3 new menu

  • Home lottery page

Draw lots and never worry about what to eat

On the right side of the home page are three random recipes. The core function is on the left side. The left side function can randomly select the number of recipes with specified conditions, and can replace any result of the draw.

  • Menu list page

Draw lots and never worry about what to eat

In the menu list, up to 12 recipes are displayed by default, which can be viewed in pages, and filtered according to the keywords and types of menu names.

  • New recipes

Draw lots and never worry about what to eat

I just listed some of the dishes I often cook and eat. In order to facilitate more people to use them, I can operate new recipes more conveniently and quickly.

Function realization

For convenience, I use the front layoutBootstrap, can adapt to the layout of the mobile phone and computer, and usedLayer.jsOptimize the pop-up box prompt, the back end uses theThinkPHP5Framework development, by the way, the data is stored in mysql, and the data table is also exported and stored in the project root directorypublic/t_food.sqlCan be directly imported and executed.

Complete source code

For your convenience, I have uploaded all the code to GitHub. WelcomePRMore fun code

GitHub project address: https://github.com/gxcuizy/what-eat-today


Draw lots and never worry about what to eat

If you have any problems, you can leave me a message and I will revise it in time. If there is something wrong, please help to correct it. By the way, the front-end page I wrote is quite patchy, professionals don’t trouble me