Download Laravel-xCRUD Integration Full Code that includes this full demo


<?php

namespace App\Http\Controllers;

use 
Illuminate\Http\Request;

class 
xManyToManyController extends Controller
{
    public function 
index()
    {
        
$xcrud Xcrud_get_instance();
        
$xcrud->table('customers');
        
$xcrud->columns('customerNumber,Customer orders,city');
        
$xcrud->fk_relation('Customer orders','customerNumber','customers_orders_fk','customer_id','order_id','orders','orderNumber',array('orderNumber','orderDate'));
        
$render $xcrud->render();
        return 
view('xcrud_simple', ['render' => $render]);
        
    }
}

Customers

#CustomernumberCustomer ordersCity 
1112Las Vegas View Edit Remove
2114Melbourne View Edit Remove
3119Nantes View Edit Remove
4121Stavern View Edit Remove
5124San Rafael View Edit Remove
6125Warszawa View Edit Remove
7128Frankfurt View Edit Remove
8129San Francisco View Edit Remove
9131NYC View Edit Remove
10141Madrid View Edit Remove
Search