Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • laravel 4 - how to Limit (Take and Skip) for Eloquent ORM

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.83k
    Comment on it

    Take and Skip are one of the functionality which is used when we are making Android API. By using Take And Skip we will fetch limited record according to our need.I can easily explain it by using simple example.

    Example:

    $start=$offset*10;
    $perpage=10;
    $topGiver = DB::table('groups')->skip($start)->take($perpage)->get();
    

    Here We can see that I have used take and skip .It will get 10 records at a time.

    Note: This feature is mostly used when we want to make load more functionality on Android or Iphone Application.

 0 Comment(s)

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: