app/Http/Controllers/StructuresController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $structures = Structure::join('comptes', function ($join) {
        $join->on('comptes.id', '=', 'structures.compte_id')
            ->where('comptes.statut', '=', 1);
            })->get();
        return view("structures.index", compact('structures'));
    }
public function index ( ) { $ structures = Structure :: join ( 'comptes' , function ( $ join ) { $ join -> on ( 'comptes.id' , '=' , 'structures.compte_id' ) -> where ( 'comptes.statut' , '=' , 1 ) ; } ) -> get ( ) ; return view ( " structures.index " , compact ( 'structures' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .