Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel or pure php?

I am trying to build a web CMS application using php and SQL. I haven't fully learned Laravel yet and I may need more time to complete my course. My question is, does Laravel come in with built-in extra security or is it the same as coding in our php. No one told me this, I have a feeling, I would have to do a lot of manual coding to secure my app using pure php.

Please fill me in with your expert suggestions.

Moen

like image 544
Moen Avatar asked Jan 11 '17 06:01

Moen


People also ask

Is Laravel better than pure PHP?

Conclusion. PHP vs Laravel are both well-suited frameworks for building PHP based web apps with effective solutions. With PHP, the development solutions might comparatively be more straightforward, and on the other hand, Laravel offers more variety in terms of tools and resources, making it reliable.

Can I use pure PHP in Laravel?

Example of protections simplified with Laravel All protections listed above can be done with pure PHP but you will have to write a lot of code.

Which is better core PHP or Laravel?

Due to their simpler structure in comparison to Laravel, Core PHP scripts are faster to execute on the condition that the codes are clearly and concisely written. Web developers can reuse Core PHP scripts in similar projects. Laravel has a layered structure, therefore, code lines will be executed a bit slower.

Should I learn PHP or Laravel?

I would definitely learn php. I cant imagine not learning php before using Laravel or any other framework. Laravel isnt a replacement for php, its a framework providing some basic structure and common features for you application for you to build upon, in php.


1 Answers

Using a framework does not secure your code magically. You still have to protect it.

you can see your web app as a house with many doors. with pure PHP, you will have to build your doors before using them. On the other side, Laravel (or any framework) comes with built-in doors but if you don't use them, your app will not be secured.

Example of protections simplified with Laravel

  • CSRF protection https://laravel.com/docs/5.3/csrf
  • SQL injections using Eloquent https://laravel.com/docs/5.3/eloquent
  • Form validation https://laravel.com/docs/5.3/validation

All protections listed above can be done with pure PHP but you will have to write a lot of code.

like image 155
ᴄʀᴏᴢᴇᴛ Avatar answered Oct 01 '22 01:10

ᴄʀᴏᴢᴇᴛ