Showing posts with label codes. Show all posts
Showing posts with label codes. Show all posts

How to insert, update and delete in Laravel


If you are just learning about laravel, meaning you are beginner of laravel, you probably want to know about how to do insert, update and delete record of a database table in laravel. If you are beginner this short tutorial is for you.

How to get raw SQL query in Laravel


Using eloquent in laravel is very convenient, but sometimes you want to know the raw SQL query that's executed behind the scene, so how to get raw SQL query from laravel eloquent?

How to do insert using DB table in Laravel

How to do insert using DB table in Laravel

In laravel you can insert data to a table in two ways, the first one and the most common is using a model, create a model for that table and then insert the data, the second way is using DB::table(), in this article i will show you how to insert to database table using DB::table().

Echoing data with default value in Laravel blade


When echoing data in laravel blade template using double or triple curly braces, you don't need to worry if the value is empty, it will not displayed as an error, but sometimes you want to put a default value if the data is empty.

What is forelse loops in Laravel blade?


Besides 'foreach' loops, we also got 'forelse' loops in laravel blade template, what exactly this 'forelse' loops does? and most importantly should we care about it?

Looping in Laravel blade template


Just like the 'if' statement, blade also has it's own way of doing loops/looping, you can do 'for' loops, 'foreach', 'forelse', and also 'while' loops. Let's take a look at the syntax.

If statement in Laravel blade template


Blade template have it's own way of doing conditional 'if' statement, the syntax is little bit different from the regular php 'if' statement, but works the same way.

How to escape output in Laravel blade


When you use the blade template in laravel, specially laravel version 4, if you use the double curly braces to output something, then you are vulnerable to XSS exploits, you need to escape the output.

How to create resource controller in Laravel 4.2


Laravel 4.2 have predefined resource controller that you can use to start develop CRUD (Create, Read, Update, Delete) based application quickly.

How to pass variable to Laravel view


Passing parameter/variable to the view in laravel is something easy to do, in this article i will show you how to pass parameter/variable to the view in laravel.

How to pass parameter to Laravel route


In laravel you can pass parameter into the route, the parameter can be pass down to the controller or even the view, you can also add constraint to filter the parameter, pretty cool huh?

How to create named route in Laravel


Another cool feature on laravel is route alias or naming route, using named route you can specify a name for your route, so it is easier for you to maintain the routes, i guess.

How to do multi language on Laravel 4.2


You might need to add multi language system on your application, and with laravel, multi language is something easy to do, that's one of the benefit of using this framework, in this tutorial i will show you how to create a multi language system on laravel 4.2.

How to create hashed password in Laravel 4.2


You need to do encryption when you want to store/save password on your application, in laravel 4.2 you can use the hashing technique to save and also checking the password, in this article i will show you how to do that.

Category

Category