Welcome Guest, Not a member yet? Register   Sign In
Shared Models between multiple applications
#3

(This post was last modified: 09-25-2022, 11:35 PM by vimkaf.)

This is what i have tried
created a shared folder in the rootpath
shared
   \Models
       \OrderModel.php
   \Libraries
...

The contents of OrderModel.php

PHP Code:
<?php

namespace Shared\Models;

use 
CodeIgniter\Model;

class 
OrderModel extends Model
{
...... 
In my Autoload Config file I have

PHP Code:
  
public $psr4 = [
        APP_NAMESPACE => APPPATH// For custom app namespace
        'Config'      => APPPATH 'Config',
        'Shared' => ROOTPATH 'shared',
    ]; 


But it is still not working.
Reply


Messages In This Thread
RE: Shared Models between multiple applications - by vimkaf - 09-25-2022, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB