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 
110310180 2003-11-11 00:00:00Nantes View Edit Remove
211210100 2023-07-29 00:00:00Las Vegas View Edit Remove
311410100 2023-07-29 00:00:00, 10102 2023-01-18…Melbourne View Edit Remove
411910100 2023-07-29 00:00:00Nantes View Edit Remove
512110100 2023-07-29 00:00:00, 10102 2023-01-18…Stavern View Edit Remove
6124San Rafael View Edit Remove
7125Warszawa View Edit Remove
8128Frankfurt View Edit Remove
9129San Francisco View Edit Remove
10131NYC View Edit Remove
Search