Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 subjective questions Controllers, Blade and Advanced Routing

INT221 — Mvc Programming 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define a Controller in MVC programming and explain how to create a basic controller using Artisan commands.

  2. Question 2 of 20

    Explain the concept of Controller Routing with a syntax example. How does it differ from closure-based routing?

  3. Question 3 of 20

    What are Restful Resource Controllers? List the default actions generated by a resource controller.

  4. Question 4 of 20

    Discuss how Middleware can be assigned within a Controller. Provide an example.

  5. Question 5 of 20

    What is Blade in the context of PHP MVC frameworks? Explain how to display PHP Output using Blade syntax.

  6. Question 6 of 20

    Explain the usage of Control Structures in Blade templates with examples for Conditional Statements and Loops.

  7. Question 7 of 20

    Describe Template Inheritance in Blade. How do @extends, @section, and @yield work together?

  8. Question 8 of 20

    What are Named Routes? Explain their benefits and provide a syntax example.

  9. Question 9 of 20

    Explain Route Groups and how they help in organizing routes. Give examples of grouping by Middleware and Prefix.

  10. Question 10 of 20

    What are Parameter Constraints in routing? How can you enforce constraints using Regular Expressions?

  11. Question 11 of 20

    Explain Domain Routing. How can you route requests based on subdomains?

  12. Question 12 of 20

    How does the framework handle URL Generation? Explain the helpers for generating the Current URL.

  13. Question 13 of 20

    Differentiate between Generating Framework URLs and Asset URLs with examples.

  14. Question 14 of 20

    What are Secure Routes? How can you generate URLs that force HTTPS?

  15. Question 15 of 20

    Explain the concept of Controller Structures. How do Single Action Controllers (Invokable) differ from standard controllers?

  16. Question 16 of 20

    How are Generation Shortcuts used in URL Generation? Give an example involving Controller Actions.

  17. Question 17 of 20

    Describe how to pass data from a Controller to a View using Blade Templates.

  18. Question 18 of 20

    Write a comprehensive note on Route Prefixing and Route Name Prefixing.

  19. Question 19 of 20

    How does Blade handle Raw PHP? Why might a developer need to use the @php directive?

  20. Question 20 of 20

    Derive the logic flow of a request in an MVC application utilizing Controller, Routing, and Blade components.

That's unit 3

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.