public function graph()
    {
        $nodes = Scaffoldinterface::all()->map(function (Scaffoldinterface $entity) {
            return ['id' => $entity->id, 'label' => $entity->tablename];
        })->toJson();

        $edges = Relation::all()->map(function (Relation $relation) {
            return ['from' => $relation->scaffoldinterface_id, 'to' => $relation->to, 'label' => $relation->having];
        })->toJson();

        return view('scaffold-interface::graph', compact('nodes', 'edges'));
    }
public function graph()
    {
        $nodes = Scaffoldinterface::all()->map(function (Scaffoldinterface $entity) {
            return ['id' => $entity->id, 'label' => $entity->tablename];
        })->toJson();

        $edges = Relation::all()->map(function (Relation $relation) {
            return ['from' => $relation->scaffoldinterface_id, 'to' => $relation->to, 'label' => $relation->having];
        })->toJson();

        return view('scaffold-interface::graph', compact('nodes', 'edges'));
    }
public function graph ( ) { $ nodes = Scaffoldinterface :: all ( ) -> map ( function ( Scaffoldinterface $ entity ) { return [ 'id' => $ entity -> id , 'label' => $ entity -> tablename ] ; } ) -> toJson ( ) ; $ edges = Relation :: all ( ) -> map ( function ( Relation $ relation ) { return [ 'from' => $ relation -> scaffoldinterface_id , 'to' => $ relation -> to , 'label' => $ relation -> having ] ; } ) -> toJson ( ) ; return view ( 'scaffold-interface::graph' , compact ( 'nodes' , 'edges' ) ) ; }
Transform entities into a grahp.

@return \Illuminate\Http\Response
Transform entities into a grahp .