What is the difference between namespace and use in laravel?



What is the difference between namespace and use in laravel?..

Answer / Khushboo Singh

In Laravel, `namespace` defines a unique name for a class or a set of classes. It helps to avoid naming collisions with other classes. On the other hand, `use` is used to import classes from namespaces, so you can use them without writing their full qualified name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What are the advanced features of laravel 6.0?

1 Answers  


Explain php artisan?

1 Answers  


Tell me how do I see all of the routes that are defined?

1 Answers  


How to clear complete cache in laravel?

1 Answers  


What are contracts?

1 Answers  


What is eager loading in laravel?

1 Answers  


What is blade php in laravel?

1 Answers  


Explain contextual binding and how does it work?

1 Answers  


What is ssrf attack?

1 Answers  


What is tinker in laravel?

1 Answers  


What is trait in laravel?

1 Answers  


Why are migrations necessary?

1 Answers  


Categories