src/Storage/DatabaseEntriesRepository.php
public function store(Collection $entries)
    {
        if ($entries->isEmpty()) {
            return;
        }

        [$exceptions, $entries] = $entries->partition->isException();

        $this->storeExceptions($exceptions);

        $table = $this->table('telescope_entries');

        $entries->chunk($this->chunkSize)->each(function ($chunked) use ($table) {
            $table->insert($chunked->map(function ($entry) {
                $entry->content = json_encode($entry->content);

                return $entry->toArray();
            })->toArray());
        });

        $this->storeTags($entries->pluck('tags', 'uuid'));
    }
public function store(Collection $entries)
    {
        if ($entries->isEmpty()) {
            return;
        }

        [$exceptions, $entries] = $entries->partition->isException();

        $this->storeExceptions($exceptions);

        $table = $this->table('telescope_entries');

        $entries->chunk($this->chunkSize)->each(function ($chunked) use ($table) {
            $table->insert($chunked->map(function ($entry) {
                $entry->content = json_encode($entry->content);

                return $entry->toArray();
            })->toArray());
        });

        $this->storeTags($entries->pluck('tags', 'uuid'));
    }
public function store ( Collection $ entries ) { if ( $ entries -> isEmpty ( ) ) { return ; } [ $ exceptions , $ entries ] = $ entries -> partition -> isException ( ) ; $ this -> storeExceptions ( $ exceptions ) ; $ table = $ this -> table ( 'telescope_entries' ) ; $ entries -> chunk ( $ this -> chunkSize ) -> each ( function ( $ chunked ) use ( $ table ) { $ table -> insert ( $ chunked -> map ( function ( $ entry ) { $ entry -> content = json_encode ( $ entry -> content ) ; return $ entry -> toArray ( ) ; } ) -> toArray ( ) ) ; } ) ; $ this -> storeTags ( $ entries -> pluck ( 'tags' , 'uuid' ) ) ; }
Store the given array of entries.

@param  \Illuminate\Support\Collection|\Laravel\Telescope\IncomingEntry[]  $entries
@return void
Store the given array of entries .