Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
laravel 4.x

Featured

Sendgrid using laravel 4.x

Laravel 4.x provide n number of sending email library such as mandrill,sendgrid etc. These all library are used to send bulk email. To use Sendgrid in our Laravel project we have to follow few steps. By this way we can implement Sendgrid in our L...

Authentication Check each time the Page reloads using laravel 4.x

In every project we have minimum 2 sections. First is User Section and second is Admin Section and In our routes we want to put authentication check each time when page is loaded. I can easily explain this by using simple example. Route::gr...

Laravel Eloquent - Attach vs Sync

Attach and Sync are the two methods which we used in our Laravel Eloquent. We can describe this as follow: attach(): 1) This is used for Insert related models. This method is used when we want to work with many-to-many relations. 2) When w...

Get all routes using Laravel 4

I have a situation where I want that every request that comes to my laravel 4 application for this I will use one controller at the moment which should handle every request. For handling this query the solution is as follow: This is the quest...

Laravel Eloquent groupBy() AND also return count of each group

We can also make our query on groupBy using Laravel 4.x.Let me demonstrate it by the following example. Suppose we have a table in which we have n number of users which are from different-different state and we have to find that how many user...

Query for multiple fields with Laravel 4.x

I have a situation where we have to make query for searching on the basis of multiple fields with Laravel 4.x. So for this we have many method either we will concatenate or we will use OR query in Laravel Example: $searchqueryResult =User:...

'Failed to open stream: Permission denied' error - Laravel

Some time when we want to access our public folder then we get the error "Failed to open stream: Permission denie' error - Laravel" . So when we get this error .Do not think much we have to clear our cache and just give permission to our folder a...

Laravel: Load method in another controller without changing the url

We can load method in another controller without changing the url using Laravel. If you are using Laravel 3 then we will define: Controller::call('ApplesController@getSomething'); If We are using Larval 4.x then we will define: $req...

How to autoload 'libraries' in laravel 4

We can easily auto-load libraries in Laravel 4.x by using namespaces in our application. Then put all libraries you code under that namespace. Suppose our directory structure would then be: libraries Myapp Search (note directo...

Push Notification for iphone using laravel 4.x

There are few steps which we have to follow to implement Push Notification. Step 1: First we will write the api to get token and device type . Here is the controller code of push notification. public function pushNotification() { $...

Using CSS in Laravel views.

CSS plays an important role in every project. In Laravel 4.x we will define our css in: public/css/custom.css Here In above path we will define our css in laravel 4.x To call a view from controller we will use the code as follow: Ex...

Laravel 4: how to order by using Eloquent ORM

In Laravel 4.x we have many facility to use query in a easy way. We will also run raw query in laravel 4.x. Laravel 4.x also provide of using order by query using Eloquent ORM. We can easily understand this by seeing the example of order by...

Update without touching timestamps (Laravel)

I want to update my data but I dont want to update my timestamps. Laravel 4.x provide us the facility to update our data without updating our timestamps. The example to Update without touching timestamps using Laravel 4.x is: $user = User::...

Laravel 4 Eloquent Query Builder - Complicated joins with variable

As we all know joins play an important role in any project . So Laravel 4.x also provide Eloquent Query Builder in which we are able to use Complicated joins with variable.This can be easily explain by using example Example: I managed to fi...

Can I Install Laravel without using Composer?

I am unable to figure out as to how I can install or use the Laravel PHP framework on any webserver without relying on the need of using Composer (PHP package/dependency manager) every time. I am making efforts to gain insight into PHP and fra...

How to get the current URL inside @if statement (blade) in Laravel 4?

In Laravel 4.x we have many predefined function which will help us to solve basic requirement. For getting the current URL inside @if statement (blade) in Laravel 4? are very easy.Syntax and Example for getting the current URL is: Syntax: Th...

How can I get the session ID in Laravel?

In some situation we need session id. In Laravel 3 and Laravel 4.x we have predefined function by which we can get session id. In laravel 3 we will get session id: Laravel 3: $session_id =_COOKIE["laravel_session"]; Laravel 4.x: $s...

Laravel, get last insert id using Eloquent

Laravel 4.x we have a facility to get last inserted id easily. By showing one of my code you will get easily understanding. Example: $karmaNote = new Karmanote; $karmaNote ->reqid = $meetingId; $karmaNote ->conne...

Laravel 4: how to run a raw SQL?

There are n number of situation where we want to write complex query so It is very difficult to write complex query using Laravel.So to overcome such problem Laravel provide raw query option. The syntax of writing raw query is:- Syntax: DB:...

Middleware In laravel 4.x

Middleware is one of the important part of any application. The code which we want to stick between request/response life cycle which is not necessary part of our application logic. That is called as middleware. Let take a example to know more a...

How to implement cron job using laravel 4.x

A cron job is time-based job scheduler in Unix-like computer operating systems. This is normally used to schedule a job that is executed periodically or in simple word we can say when we want to execute any command automatically after some time t...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: