Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns trailing name component of path
<?php basename(string $path, string $suffix = ""): string
<?php     public function slug($url)

    {

        return basename($url);

    }
<?php         }, 200, [

            'Content-Type' => $filesystem->getMimetype($file),

            'Content-Length' => $filesystem->getSize($file),

            'Content-disposition' => 'attachment; filename="'.basename($file).'"',

        ]);

    }
<?php     {

        return collect($this->files->directories(getcwd().'/resources/lang'))

            ->map(function ($dir) {

                return basename($dir);

            })

            ->prepend('en')->unique()

            ->all();
<?php     {

        return collect($this->files->directories(getcwd().'/resources/lang'))

            ->map(function ($dir) {

                return basename($dir);

            })

            ->flip()->forget('en')->flip()

            ->all();