Laravel, where to begin?

Hi :)

So, I have been coding PHP for some years now and know how to build functions and create classes etc. - know a bit about OOP.
I would really like to jump into Laravel and was told OOP is required.

So I have been reading up on OOP PHP and learned a few things, but still not enough it seems.
When I start to watch/read guides about Laravel, I see code like this:

Route::get('category', function() {
{
	return 'Simple category page text';
});

Open in new window


'Route::get' ...
This is completely new type of code for me and not something I have been learning or using while making PHP functions and classes.
What is it and where can I learn more about it?

I would really like to learn more about this.
Hope one of you will kick me in the right direction :)


, Kenneth
kgp43Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Laravel has some surprises for you if you understand PHP OOP.  For one thing, the double-colon notation would lead you to believe that Route is a class, and get() is a static method, but in Laravel that is not always the case.  So prepare yourself to be a bit surprised once in a while.  Laravel makes use of PHP Reflection to inspect its own code (and by implication, your code), and the Laravel "facades" may have coding structures that look a lot like static methods, without actually being static methods.

Laravel uses RESTful architecture.  In the instant case of Route::get() here is what will happen.  When Laravel receives a GET-method request with a URL that looks like this...

application.php?category

... it will run the anonymous function that is defined in the get() method call.  In this case, the script will simply return 'Simple category page text' and the Laravel output modules will display that on the browser window.

The best place to start with Laravel is to read the Laravel documentation.  It's deceptively simple, and you will probably find yourself saying, "That can't be all there is to it!"  But in reality, almost all of the docs are correct and complete as written.  It really is that simple.
http://laravel.com/docs/5.1

After that, I would spend some time learning Symfony.  Laravel relies heavily on it.

The Eloquent ORM is worth your attention.  It's Laravel's "active record" implementation and it's another one of those things that seems too simple to be true.  But it is amazingly powerful and expressive.
http://laravel.com/docs/5.1/eloquent

You will want to have Composer installed and available via the command line.
https://getcomposer.org/

PHPUnit may be helpful, too.
https://phpunit.de/ 

You will want to understand Laravel Artisan.
http://laravel.com/docs/5.1/artisan

Jeffrey Way's Laracasts is a great knowledge base for Laravel.  Absolutely worth the few dollars.  Be sure to pay attention to which Laracasts apply to your version of Laravel - there are breaking changes from L4 to L5, but most of the progress was good progress, so the upgrade is worth it.
https://laracasts.com/

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
By the way, "Welcome to the Light!"
kgp43Author Commented:
Sorry about the late reply, I have been watching Laracasts videos nonstop since you suggested subscribing :)

That system is kinda advanced, but I think it will be much easier to work with, when I get the hang of it.
Anyway, thanks for the help, i'm on the right track now it seems :)
Ray PaseurCommented:
It is advanced, and in all kinds of good ways!  If Laravel seems a bit "heavy" you might want to look at Lumen.  Probably faster, definitely simpler.
kgp43Author Commented:
Going to stick with Laravel, might as well go all-in from start :)
And the community around it seems to be rather big and helpful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.