Welcome Guest, Not a member yet? Register   Sign In
Myth:Auth - Views location
#1

I'm missing something that should be pretty clear, so hopeful that someone can easily point me in the right direction.

I installed Myth:Auth with composer, then ran through the various Spark commands to configure it.  The publish command created the new View files, but the Auth config file leaves the vendor path in place.

Code:
Publish Views? [y, n]: y
  created: Views/Auth/emails\activation.php
  created: Views/Auth/emails\forgot.php
  created: Views/Auth/forgot.php
  created: Views/Auth/layout.php
  created: Views/Auth/login.php
  created: Views/Auth/register.php
  created: Views/Auth/reset.php
  created: Views/Auth/_footer.php
  created: Views/Auth/_header.php
  created: Views/Auth/_message_block.php
  created: Views/Auth/_navbar.php
Publish Config file? [y, n]: y
  created: Config/Auth.php

[Image: wkAnI0.jpg]

So I think I need to change the Auth config to match the file path that the publish function used?  I'm tried a few different variations, but the files can't be found and I get 'Whoops' error message.

PHP Code:
//--------------------------------------------------------------------
    // Views used by Auth Controllers
    //--------------------------------------------------------------------

    public $views = [
        'login' => 'Views\Auth\login',
        'register' => 'Views\Auth\register',
        'forgot' => 'Views\Auth\forgot',
        'reset' => 'Views\Auth\reset',
        'emailForgot' => 'Views\Auth\emails\forgot',
        'emailActivation' => 'Views\Auth\emails\activation',
    ];

    //--------------------------------------------------------------------
    // Layout for the views to extend
    //--------------------------------------------------------------------

    public $viewLayout 'Views\Auth\layout'


Code:
log-2021-03-26.log:
CRITICAL - 2021-03-26 15:55:50 --> Invalid file: Views\Auth\login.php
#0 /home/user/path/vendor/codeigniter4/framework/system/View/View.php(203): CodeIgniter\Exceptions\FrameworkException::forInvalidFile('Views\\Auth\\logi...')
#1 /home/user/path/vendor/codeigniter4/framework/system/Common.php(1217): CodeIgniter\View\View->render('Views\\Auth\\logi...', Array, true)
#2 /home/user/path/vendor/myth/auth/src/Controllers/AuthController.php(54): view('Views\\Auth\\logi...', Array)
#3 /home/user/path/vendor/codeigniter4/framework/system/CodeIgniter.php(936): Myth\Auth\Controllers\AuthController->login()
#4 /home/user/path/vendor/codeigniter4/framework/system/CodeIgniter.php(432): CodeIgniter\CodeIgniter->runController(Object(Myth\Auth\Controllers\AuthController))
#5 /home/user/path/vendor/codeigniter4/framework/system/CodeIgniter.php(333): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#6 /home/user/website.com/index.php(44): CodeIgniter\CodeIgniter->run()
#7 {main}
Reply


Messages In This Thread
Myth:Auth - Views location - by BilltheCat - 03-26-2021, 02:05 PM
RE: Myth:Auth - Views location - by BilltheCat - 03-27-2021, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB