2016-05-02 1 views
1

内部結合を改ページしようとしても動作しません。内部結合の方法 - > paginate()Laravel 5

このことに私のコード

$positions = DB::table('position') 
    ->join('company', 'position.company_id', '=', 'company.id') 
    ->select('position.*', 'company.name') 
    ->paginate(15) 
    ->get(); 

これは、配列のように見えるものである(のpaginateなし - >())

Array(
[0] => stdClass Object 
    (
     [id] => 1 
     [company_id] => 1 
     [title] => Software Developer 
    ) 

[1] => stdClass Object 
    (
     [id] => 2 
     [company_id] => 2 
     [title] => Accountant 
    ) 

[2] => stdClass Object 
    (
     [id] => 3 
     [company_id] => 3 
     [title] => Insurance salesman 
    ) 

、これは私が

use DB; 
use Illuminate\Support\Facades\Input; 
use Illuminate\Http\Request; 
use App\Http\Requests; 

答えて

関連する問題