How to Declaration of namespace ?

Answers were Sorted based on User's Feedback



How to Declaration of namespace ?..

Answer / amit khanna

Namespaces can be defined as a class of elements in which each element has a unique name to that associated class. It may be shared with elements in other classes.

Syntax : use <namespace-name>;

The use keyword allows the developers to shorten the namespace. The default namespace used in Laravel is app

You can create a user defined namespace by using artisan command as shown below

php artisan app:name Manger

Is This Answer Correct ?    0 Yes 0 No

How to Declaration of namespace ?..

Answer / Arpit Kapoor

To declare a namespace in PHP, you can use the `namespace` keyword followed by the name of your namespace. For example: `namespace App;`. All the classes within this namespace should be located in the corresponding directory structure.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Explain few features of laravel?

1 Answers  


What is laravel best for?

1 Answers  


Explain how to bind a service container to a service provide?

1 Answers  


What are laravel contract’s?

1 Answers  


What is meant by Controller Middleware ?

2 Answers  


What is ioc container in laravel?

1 Answers  


Tell me what is system requirement for installation of laravel 5.2 (latest version)?

1 Answers  


Who are Manually Authenticating Users in Laravel ?

2 Answers  


Please explain what is laravel?

1 Answers  


How to enable maintenance mode in laravel 5?

1 Answers  


Tell me how can you display html with blade in laravel?

1 Answers  


How will you explain dd() function in laravel?

1 Answers  


Categories