Welcome Guest, Not a member yet? Register   Sign In
No Publisher classes detected in Publishers across all namespaces.
#1

-hi, i want to publish the uploads directory, so i wrote this :
<?php
namespace App\Publishers;
use CodeIgniter\Publisher\Publisher;

class UploadPublisher extends Publisher
{
    protected $source = WRITEPATH . 'uploads/';
    protected $destination = FCPATH . 'assets/uploads';

    public function publish(): bool
    {
        return $this
            ->addPath('*')
            ->copy();
    }
}

-But i have this issue after doing php spark publish

No Publisher classes detected in Publishers across all namespaces.
Reply
#2

Have you fixed it?
Reply
#3

not yet
Reply
#4

The following code does not seem to work:
$this->addPath('*')->copy()

See the example and fix the code:
https://codeigniter4.github.io/CodeIgnit...es-example
Reply




Theme © iAndrew 2016 - Forum software by © MyBB