How to Declaration of namespace ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is namespace in php laravel?

541


What are the difference between laravel 5 & laravel 4?

501


Explain Laravel - Event Handling ?

1138


Tell me how do you do dependency injection in laravel?

480


Name some inbuilt authentication controllers of laravel.

543


What is composer tool?

532


Explain some benefits of laravel over other php frameworks.

494


What do you know about csrf token in laravel?

545


Explain binding a singleton?

573


How to Create Creating a Cookie in Laravel ?

990


What is register method?

525


Is laravel backend?

520


What is the role of service provider?

504


How can you reduce memory usage in laravel?

499


How to get data between two dates with query in laravel?

519