private function relationData()
    {
        $onData = collect($this->data)->reject(function ($value, $key) {
            return !str_contains($key, 'on');
        });

        $foreignKeys = collect($this->data)->reject(function ($value, $key) {
            return !str_contains($key, 'tbl');
        });

        $this->onData = array_values($onData->toArray());

        $this->foreignKeys = array_values($foreignKeys->toArray());
    }
private function relationData()
    {
        $onData = collect($this->data)->reject(function ($value, $key) {
            return !str_contains($key, 'on');
        });

        $foreignKeys = collect($this->data)->reject(function ($value, $key) {
            return !str_contains($key, 'tbl');
        });

        $this->onData = array_values($onData->toArray());

        $this->foreignKeys = array_values($foreignKeys->toArray());
    }
private function relationData ( ) { $ onData = collect ( $ this -> data ) -> reject ( function ( $ value , $ key ) { return ! str_contains ( $ key , 'on' ) ; } ) ; $ foreignKeys = collect ( $ this -> data ) -> reject ( function ( $ value , $ key ) { return ! str_contains ( $ key , 'tbl' ) ; } ) ; $ this -> onData = array_values ( $ onData -> toArray ( ) ) ; $ this -> foreignKeys = array_values ( $ foreignKeys -> toArray ( ) ) ; }
Deduce onData and foreingKeys.

@return void
Deduce onData and foreingKeys .