Unit4 - Subjective Questions

INT221 • Practice Questions with Detailed Answers

1

Explain how to retrieve all input data from an incoming HTTP request in Laravel. How does it differ from retrieving a specific input value?

2

Discuss the methods available in Laravel to determine if an input value is present in the request.

3

What is the concept of "Old Input" in Laravel? Describe how to flash input to the session and retrieve it subsequently.

4

How does Laravel handle uploaded files? Explain how to access an uploaded file and verify its validity.

5

Describe the process of storing uploaded files in Laravel using the store method. Provide a syntax example.

6

Explain how to retrieve Cookies in Laravel. How does the Laravel framework ensure the security of cookies?

7

How can you attach a Cookie to an outgoing Response in Laravel? Explain the usage of Cookie::queue.

8

What are 'Mailables' in Laravel? Describe the structure of a Mailable class and its build method.

9

Write the code snippet to send an email using the Mail facade in Laravel.

10

Explain the concept of Laravel Localization. How are translation strings stored and retrieved?

11

How do you handle parameters/placeholders in Laravel Localization strings? Provide an example.

12

What are Laravel Sessions? List and briefly describe three available session drivers.

13

Explain how to access session data in Laravel using both the Request instance and the global session helper.

14

Describe the methods used to store data in the Laravel Session. Distinguish between put and push.

15

How can you retrieve and delete an item from the session in a single statement? Also, explain how to delete specific items versus all items.

16

Explain the concept of "Flash Data" in Laravel sessions. Why is it useful and how is it implemented?

17

What is the importance of Regenerating the Session ID? How is it done in Laravel?

18

Explain the url and route helpers for URL Generation in Laravel.

19

How do you check for input data in an array format using dot notation in Laravel?

20

Compare the usage of Cookie and Session in Laravel with regards to data persistence and storage location.