Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

RobertN's avatar

Learning PHP from Laravel?

Yes, i know....the title sounds really weird but basically this is my question, now let me provide a bit of context.

So basically i don't have an experience as coder, i was always techy, i always liked to do stuff on pc and never gave up until i managed to accomplish what i wanted, like installing OSX on PC, rooting different android devices via terminal and so on. Anyway, fast forward till late last year where i picked up some html, css and javascript, nothing too advanced. I got employed recently as a junior back-end developer by a local company where they use Laravel for back-end projects and i started my journey by learning php for ~2 weeks, basic stuff like variables, data types, some php globals, even did some small projects via some tutorials but nothing by myself.

After 2 weeks i started with laravel, and i knew Jeffrey from the 30 days html course, so laracast was an easy choice for me to start learning laravel fundamentals and boy, it was rough in the first 3 days where i had to learn so much stuff at once but i did it, i mean i am decent in terminal with artisan commands, i learned about mvc, etc. In ~1 month+ i did a small to medium internal project for my company in laravel, basically a CRM where i learned more or less about CRUD operations, db relations, routing, datatables, installing and using different packages and a bit of javascript/jquery. Of course, with some help from senior dev when really needed.

Now going back to my question, is that i'm a bit afraid that i'm neglecting PHP along the way and i don't know if it's true overall but laravel just doesn't look or feel like plain PHP, for me it seems mostly like a new language. So if i learn Laravel to be really decent or even more, will i be able to understand plain PHP after that? I feel like Laravel is doing a lot of stuff behind and i know it really does and by beginning so early with a framework it's hard for me to imagine writing php without some sort of framework or packages. I am correct to be worried? Should i continue with laravel and PHP will come almost naturally along the way or should i focus more on learning plain PHP when i can(free time + a bit of work time) ?

Thanks!

0 likes
7 replies
martinbean's avatar

@RobertN Personally, I feel it’s a bit disingenuous to take a job as a back-end developer if you don’t know anything about ‘coding’. It’s like me taking a job as a junior accountant and saying, “I know spreadsheets. I’ll pick the rest up on the way.” I hope you were taken on in this role under the understanding there would be a grace period of you learning the required skills for the job.

Back to your actual question though, you’re better off learning the language PHP. If you learn Laravel, you’re learning a framework only and those skills won’t be transferrable. Whereas if you learn the language, you’ll be able to then pick up frameworks written in that language a lot easier.

In a previous role, I’d interviewed people for a PHP developer role. There was a simple PHP test (take an all-uppercase string and make it title case). A couple of candidates failed because they had just made websites in CodeIgniter (this was a while back) so outside of CodeIgniter, so they were lost when it came to solving a trivial PHP problem.

1 like
ohffs's avatar

It might be useful to learn by thinking to yourself 'how would I do this without laravel?'. For instance how would you build a Request object? How would you build up your objects without it's container? Look at some of the helper functions and see how you'd implement them yourself.

That way you gradually learn the underlying PHP things as you're learning more about the framework.

There are also more bare-bones frameworks like slim that might help you learn more and see different approaches to familiar problems.

davestewart's avatar

Completely agree with @ohffs.

You can build a basic router in 10 lines or so of PHP.

You could build super basic DI container in probably 30 - 50.

You need to figure out the principles behind the classes, then build it using PHP.

And again, totally agreed with picking up other frameworks! Laravel is only one way to do things.

Writing your own packages / plugins is the best of both worlds in my view - you leverage the framework to get the wider functionality, but your package will solve Problem X, the functions are the API, and the content is raw PHP.

Good luck; it's loads of fun :)

phpMick's avatar

I don't really worry about losing my raw PHP, this feels like the way the world is changing.

Frameworks are part of the evolution of PHP development.

What's the point reinventing the wheel, if you don't have to?

Mick

1 like
martinbean's avatar

@phpMick There’s a difference between utilising a framework, and limiting to yourself to a framework. Not ‘really [worrying] about losing [your] raw PHP’ is a very narrow-minded—and scary—outlook to have. Knowing the language underneath a framework has all kinds of benefits. A comparison is the awful jQuery code written by developers who don’t have a basic understanding of JavaScript.

1 like
jekinney's avatar

A lot of good and amazing points!

@martinbean I feel yeah, recently interviewing devs for a expanding start up and most couldn't tell me the difference between for loop and foreach loop in code.

Personally I tend to lean towards pure php over helpers in some cases. Look at the Form Helpers, you call a php class and method to out put html:

Form::close();

public function close()
{
    return '</form>';
}

Why not just save time, energy and performance by ''. Obviously all the helpers do the same thing, though some are more complicated then others, but the point is the same.

I think the most important thing is if you can figure it out on your own. Be able to understand the PHP manual and read docs. Understanding how it works as Jeffery tries to show us in his videos is a good way to learn too. How do you handle something with no helper? How do you handle when the helper has limitations and doesn't fit your exact needs? Laravel is great and arguably covers 90% if requirements to some degree but nothing can be 100% as each use case is different.

davorminchorov's avatar

You should focus more on Raw PHP and Object Oriented Programming with PHP because that's the main thing you will probably do most of the time. Sure Laravel has some helpers, but you'll have a hard time with a big project which has to be extended in the future. You'll probably end up rewriting the code if you don't know how to organize it in different classes, files, and folders from the start.

Please or to participate in this conversation.