We answer 10 of the most asked questions that people often have regarding laravel.
1. Can Laravel be used for frontend?
Absolutely it can. Laravel is MVC which stands for Model (Database Interaction), Views (Frontend / How a website looks) and Controllers (How Models interact with Views). Laravel views use the Blade templating engine which compile to PHP and are cached to speed up delivery. Anyone who knows PHP can write blade templates.
In addition Laravel will play nice with various Javascript frameworks such as Vue and React and even has its own Javascript Framework called LiveWire which makes it simple to add interactivity to websites without leaving the Laravel environment.
2. Can Laravel build a mobile app?
Laravel is based on PHP which cannot currently be installed on mobile devices. However Laravel can easily be used to create the backend API’s consumed by mobile apps.
3. Which Laravel version am i using?
You can tell this by taking a look in the composer.json file. Look for the key that says laravel/framework. Next to this will be a number. However this can be inaccurate if you’ve updated your website. In this case pop open a terminal window on your computer and navigate to the directory holding your Laravel files and type php artisan –version. This will give the exact version you are working with
4. Laravel, who uses it?
Companies and organisations such as the BBC, Pfizer and Liberty Mutual use Laravel.
5. Who created Laravel?
Laravel was developed by Taylor Otwell as an alternative to the CodeIgniter PHP framework in 2011. It has since gone on to become the most popular and most used PHP MVC framework and is still (very much) in active development.
6. Why Laravel is so popular?
Laravel is popular because its easy to pick up (any PHP developer should be ok) and feature packed. It comes included with a JS framework, has authentication and authorization baked in and is great for testing. It is also under active development and has an active community creating packages to extend its usefulness.
7. Can Laravel run on shared hosting?
Usually yes. It depends on the host. As long as the host supports PHP, has composer installed and allows you to set the document route there should be no problems in running Laravel on shared hosting.
8. Can Laravel be hacked?
Yes. Like any other technology Laravel is subject to the threat of hacking. Keep your website up-to-date, code with security in mind and pay attention to any urgent issues and you should help to mitigate any threats to your website.
9. Can Laravel 6 be upgraded to 8?
Yes, you can upgrade from one version to another. Manually you can find guides at Laravel.com that will help. Alternatively a semi-automatic way to upgrade is provided by a company called Laravel Shift. They connect to your Laravel website repository and create a pull request containing the changes necessary to upgrade. This is a paid service, but speeds the process up quite considerably.
10. How Laravel auth works?
In later version of the Laravel framework starter packages have been created that make setup of authentication and authorization straightforward. The packages Laravel Breeze, Laravel JetStream and Laravel Fortify have different levels of complexity depending on your requirements. In brief however, Laravel has the concept of a “user” with “gates” which guard what a user can do and restricts access to those without permission.