Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sr57's avatar
Level 39

How to ask a question

To explain the problem you should give :

-1- The context and code that you think relevant to your problem

  • context : config, platform, browser, ...

  • code : migration, model, controller, ...

-2- Describe the problem with this 3 points

  • the command you did

  • the result you got

  • your expected result

-3- Sometime it's useful to give the previous information in 2 different contexts.

0 likes
7 replies
lat4732's avatar

My personal opinion is that a general requirement for asking question must be:

Before asking a question, try solving the problem by your own and share what you've tried inside your question.

1 like
knubbe's avatar

On Stack Overflow there's such a nice tutorial how to ask a question ;)

1 like
alan9608's avatar

These answers are completely not helpful. I want to ask a question, include some code to show what the problem is, and I DON'T KNOW HOW!! First, how is the question distinct from the code. How is the code placed in a block that looks like code instead of a mass of weird text? It may seem like an obvious thing to people who do it every day, but it is not. Refering to a DIFFERENT place (github) and say do it like that, is SOOO unhelpful since I have never done it github either. Why is this information so difficult to explain?

thinkverse's avatar

Question: How do you write inline code and code blocks? 🤔

Answer: We write inline code with single backticks for instance - `$variable`. For distinct code blocks, we use three backticks, like this.

```
Route::view('/', 'welcome');
```
thinkverse's avatar

Doesn't hurt to explain how to do code blocks here as well does it? 🤔

Please or to participate in this conversation.