explode

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Split a string by a string
explode(string $separatorstring $stringint $limit PHP_INT_MAX): array
    {

        return 
collect()

            ->
when(config('livewire.view_path') != resource_path(), function ($collection) {

                return 
$collection->concat(explode('/',str($this->baseViewPath)->after(resource_path('views'))));

            })

            ->
filter()

            ->
concat($this->directories)
    public static function getName()

    {

        
$namespace collect(explode('.'str_replace(['/''\\'], '.'config('livewire.class_namespace'))))

            ->
map([Str::class, 'kebab'])

            ->
implode('.');
            ->map([Str::class, 'kebab'])

            ->
implode('.');



        
$fullName collect(explode('.'str_replace(['/''\\'], '.', static::class)))

            ->
map([Str::class, 'kebab'])

            ->
implode('.');
    public function beforeFirstDot($subject)

    {

        return 
head(explode('.'$subject));

    }



    public function 
afterFirstDot($subject) : string
        if (is_array($rules)) return $rules;



        return 
explode('|'$rules);

    }



    public static function 
maxUploadTime()
            PHPUnit::assertContains(

                
$className,

                
explode(' '$this->attribute($selector'class')),

                
"Element [{$fullSelector}] missing class [{$className}]."

            
);
            PHPUnit::assertNotContains(

                
$className,

                
explode(' '$this->attribute($selector'class')),

                
"Element [{$fullSelector}] has class [{$className}]."

            
);
        foreach (data_get($this'effects.dirty', []) as $property) {

            
$property head(explode('.'$property));



            
data_set($dirtyMemo'data.'.$property$responseMemo['data'][$property] ?? null);

        }
    public function extractOriginalNameFromFilePath($path)

    {

        return 
base64_decode(head(explode('-'last(explode('-meta'str($path)->replace('_''/'))))));

    }



    public static function 
createFromLivewire($filePath)
        ];



        
$outputFileStr $uploader->dehydratePropertyFromWithFileUploads($tmpFileArray);

        
$imageListArr explode(','str_replace(['livewire-files:''[' ']'],  ''$outputFileStr));



        
$this->assertTrue(str_contains($outputFileStr'livewire-files:'));

        
$this->assertTrue(count($imageListArr) === count($tmpFileArray));
        $wireableInput = new DehydrateTestWireable($tmpFile$tmpFileArray'test string'1);



        
$wireableOutput $uploader->dehydratePropertyFromWithFileUploads($wireableInput);

        
$imageListArr explode(','str_replace(['livewire-files:','['']'], ''$wireableOutput->imageList));



        
$this->assertTrue(str_contains($wireableOutput->image'livewire-file:'));

        
$this->assertTrue(str_contains($wireableOutput->imageList'livewire-files:'));
        $outputUploadedFiles $uploader->dehydratePropertyFromWithFileUploads($uploadedFiles);

        
$uploadedFilesList explode(','str_replace(['livewire-files:''['']'], ''$outputUploadedFiles));

        
$this->assertTrue(str_contains($outputUploadedFiles'livewire-files:'));

        
$this->assertTrue(count($uploadedFilesList) === count($uploadedFiles));
        $classDirname str_replace('/''\\'dirname(str_replace('\\''/'$class)));



        
$classDirnameSegments explode('\\'$classDirname);



        return 
Arr::wrap(Collection::times(count($classDirnameSegments), function ($index) use ($class$classDirnameSegments) {

            
$classDirname implode('\\'array_slice($classDirnameSegments0$index));
    public function id()

    {

        return 
explode('|'$this->recaller3)[0];

    }
    public function token()

    {

        return 
explode('|'$this->recaller3)[1];

    }