class_basename

The class_basename function returns the class name of the given class with the class's namespace removed:
<?php $class = class_basename('Foo\Bar\Baz');
<?php                 return Str::endsWith($fqcn, 'Controller');

            })

            ->mapWithKeys(function (string $file, string $fqcn) {

                return [$fqcn => class_basename($fqcn)];

            })

            ->toArray();
<?php     public function name(): string

    {

        return Str::studly(class_basename(get_called_class()));

    }



    public function component(): string
<?php     public function component(): string

    {

        return Str::snake(class_basename(get_called_class()), '-');

    }



    public function beforeRenderingErrorPage(Flare $flare, Throwable $throwable)