Merge branch 'too/bookingpagination' into 'master'

Too/bookingpagination

See merge request CIEFWorldwideSdnBhd/exchange!41
This commit is contained in:
Jack Goh
2018-06-28 06:17:26 +00:00
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -19,11 +19,11 @@ class BookingController extends Controller
{
public function index(){
$user = Auth::user();
$bookings = Booking::select('id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
$user = Auth::user();
$bookings = Booking::select('id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
->where('user_id', $user->id)
->get();
->get()
->paginate(10);
// reformat to fit frontend structure
+1
View File
@@ -4,6 +4,7 @@ namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Database\Seeder;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\Storage;