Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns a parent directory's path
<?php dirname(string $path, int $levels = 1): string
<?php     public function boot()

    {

        if (!defined('STUBS_PATH')) {

            define('STUBS_PATH', dirname(__DIR__) . '/stubs');

        }



        if (!defined('CUSTOM_STUBS_PATH')) {
<?php         ], 'blueprint-config');



        $this->publishes([

            dirname(__DIR__) . '/stubs' => CUSTOM_STUBS_PATH,

        ], 'blueprint-stubs');

    }
<?php     protected function create(string $path, $content)

    {

        if (!$this->filesystem->exists(dirname($path))) {

            $this->filesystem->makeDirectory(dirname($path), 0755, true);

        }
<?php     protected function create(string $path, $content)

    {

        if (!$this->filesystem->exists(dirname($path))) {

            $this->filesystem->makeDirectory(dirname($path), 0755, true);

        }



        $this->filesystem->put($path, $content);
<?php             ->andReturn($this->stub('controller.method.stub'));



        $this->filesystem->expects('exists')

            ->with(dirname($path))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($path, $this->fixture($controller));
<?php             ->andReturn($this->stub('controller.method.stub'));



        $this->filesystem->expects('exists')

            ->with(dirname($path))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($path, $this->fixture($controller));
<?php         $certificateTypeController = 'app/Http/Controllers/CertificateTypeController.php';



        $this->filesystem->expects('exists')

            ->with(dirname($certificateController))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($certificateController, $this->fixture('controllers/certificate-controller.php'));
<?php             ->with($certificateController, $this->fixture('controllers/certificate-controller.php'));



        $this->filesystem->expects('exists')

            ->with(dirname($certificateTypeController))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($certificateTypeController, $this->fixture('controllers/certificate-type-controller.php'));
<?php             ->andReturn($this->stub('model.method.comment.stub'));



        $this->filesystem->expects('exists')

            ->with(dirname($path))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($path, $this->fixture($model));
<?php         $certificateTypeModel = 'app/Models/CertificateType.php';



        $this->filesystem->expects('exists')

            ->with(dirname($certificateModel))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($certificateModel, $this->fixture('models/certificate-pascal-case-example.php'));
<?php             ->with($certificateModel, $this->fixture('models/certificate-pascal-case-example.php'));



        $this->filesystem->expects('exists')

            ->with(dirname($certificateTypeModel))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($certificateTypeModel, $this->fixture('models/certificate-type-pascal-case-example.php'));
<?php             ->andReturn($this->stub('model.method.comment.stub'));



        $this->filesystem->expects('exists')

            ->with(dirname($path))

            ->andReturnTrue();



        $this->filesystem->expects('put')
<?php             ->andReturn($this->stub('model.method.stub'));



        $this->filesystem->expects('exists')

            ->with(dirname('app/Models/Comment.php'))

            ->andReturnTrue();



        $this->filesystem->expects('put')
<?php         $paths = collect($path)->combine($test)->toArray();

        foreach ($paths as $path => $test) {

            $dirname = dirname($path);



            $this->filesystem->expects('exists')

                ->with($dirname)
<?php         $certificateTypeControllerTest = 'tests/Feature/Http/Controllers/CertificateTypeControllerTest.php';



        $this->filesystem->expects('exists')

            ->with(dirname($certificateControllerTest))

            ->andReturnTrue();

        $this->filesystem->expects('put')

            ->with($certificateControllerTest, $this->fixture('tests/certificate-pascal-case-example.php'));