Download Laravel-xCRUD Integration Full Code that includes this full demo
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class xJoinController extends Controller
{
public function index()
{
$xcrud = Xcrud_get_instance();
$xcrud->table('employees');
$xcrud->join('officeCode','offices','officeCode'); // ... INNER JOIN offices ON employees.officeCode = offices.officeCode ...
$render = $xcrud->render();
return view('xcrud_simple', ['render' => $render]);
}
}
# | Lastname | Firstname | Extension | Officecode | Reportsto | Jobtitle | City | Phone | Addressline1 | Addressline2 | State | Country | Postalcode | Territory | Ordering | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Bondured1 | Gerard23 | toto | gerard23.bondured1@myoffice.com | 7 | 1050 | Sale Manager (EMEA) | London | +44 20 7877 2041 | 25 Old Broad Street | Level 7 | UK | EC2N 1HN | EMEA | 4 | View Edit Remove | |
2 | Bow | Anthony8 | x5428 | anthony8.bow@myoffice.com | 6 | 1056 | Sales Manager (NA) | Sydney | +61 2 9264 2451 | 5-11 Wentworth Avenue | Floor #2 | Australia | NSW 2010 | APAC | 7 | View Edit Remove | |
3 | Jennings | Leslie | x540 | ljennings@classicmodelcars.com | 5 | 1143 | Sales Rep 2 | Tokyo | +81 33 224 5000 | 4-1 Kioicho | Chiyoda-Ku | Japan | 102-8578 | Japan | 1 | View Edit Remove | |
4 | Thompson | Leslie | x4065 | lthompson@classicmodelcars.com | 1 | 1143 | Sales Rep 3 | San Francisco | +1 650 219 4782 | 100 Market Street | Suite 300 | CAhjkl | USA | 94080 | NA | 3 | View Edit Remove |
5 | Firrelli | Julie | x2173 | jfirrelli@classicmodelcars.com | 2 | 1143 | Sales Rep | Boston | +1 215 837 0825 | 1550 Court Place | Suite 102 | MA | USA | 02107 | NA | 6 | View Edit Remove |
6 | Patterson | Steve | rfr | spatterson@classicmodelcars.com | 2 | 1143 | Sales Rep | Boston | +1 215 837 0825 | 1550 Court Place | Suite 102 | MA | USA | 02107 | NA | 6 | View Edit Remove |
7 | Tseng | Foon Yue | o224 | ftseng@classicmodelcars.com | 5 | 1143 | Sales Rep | Tokyo | +81 33 224 5000 | 4-1 Kioicho | Chiyoda-Ku | Japan | 102-8578 | Japan | 1 | View Edit Remove | |
8 | Vanauf | George N | x4102 | gvanauf@classicmodelcars.com | 3 | 1143 | Sales Rep | NYC | +1 212 555 3000 | 523 East 53rd Street | apt. 5A | NY | USA | 10022 | NA | 0 | View Edit Remove |
9 | Bondur | Loui | x6493 | lbondur@classicmodelcars.com | 7 | 1102 | Sales Rep | London | +44 20 7877 2041 | 25 Old Broad Street | Level 7 | UK | EC2N 1HN | EMEA | 4 | View Edit Remove | |
10 | Hernandez | Gerard | x2028 | ghernande@classicmodelcars.com | 4 | 1102 | Sales Rep | Paris | +33 14 723 4404 | 43 Rue Jouffroy D'abbans | France | 75017 | EMEA | 5 | View Edit Remove |