Why i choose Laravel for my next project?


As discussed in my last article How to choose a PHP Framework?, there are lots of php framework and i prefer Laravel – The PHP Framework For Web Artisans for my next project just because of following reasons:
Ease of setup: Up and running with laravel is super easy, you can install it using composer or by using installer

That’s it, laravel is ready for your next project.

Routing: The framework for web artisan has incredibly simple routing approach which provides easy authentication for different kind of modules in our project eg. blog can be access publicly but dashboard containing private and sensitive data must be access after authenticating users, laravel handles such kind of situation with super easy configuration in routing. Also, it provides mechanism to validate the url params within the routing system using regular expressions thus securing our project to a great extent.

Eloquent ORM: Eloquent ORM, provided with ActiveRecord implementation for interacting with sql and nosql databses like mysql, mongodb etc.Eloquent ORM works quite fast and we have to write very less code to use it.For every table a  model is created and the core logic goes in controller  eg.

Caching: Laravel comes with inbuilt support of file and database based caching which supports two of the most popular databases for caching i.e. redis and memcached.Storing and removing data from cache is as easy as you think.

API(Application Programming Interface): We can create API’s that can power our mobile and web application without making much fuss, one can create super flexible, scalable and industry standard api with the resourceful controller.

Artisan: It is the command line interface bundled with laravel which provides various userful commands to speed up your development cycle.eg.

Blade Template Engine: Blade has unique feature of inheritance and sections. Inheritance means you can extend a layout easily and with the use of sections, each part of a page can be individually handled by some other developer without interrupting in others code.

Other features: Laravel is bundled with lots of features which helps a developer to “Write Less And Do More”.Facades,validation,authentication, form handling, session and cookie security,3rd party library inclusion, templating engine and many more makes Laravel a robust,easy to maintain, secure, easy to code and highly scalable php framework.

All in all, this is the framework for web artisans, deploy it and start creating something awesome.

Sending post request using curl in php

Today we are going to learn about sending post request using curl in php.You can learn about basics of curl in my last article about using curl library in php “what-is-curl-in-php“.

Process of sending post request using curl in php

Find a form to submit using post method.

Get the url where the form get submitted.


Get form fields name.




In above images, i used firebug to check the post request.In first image, i filled the form and opened firebug and click on persist button so that i can see post request. In second image, i have looked for form fields and also you can check the post data string in the image. By using following code, I will send a message by submitting a form i.e. sending data in post using curl.

When i check my mail, hurrah, i got the message.


That’s all for today, hope you enjoy and do try at home.