Welcome Guest, Not a member yet? Register   Sign In
Can't use costum library
#1
Sad 
(This post was last modified: 10-06-2020, 09:30 AM by SimonsCode22.)

Hello,
I'm a newbie to this framework and I wanted to create a simple library and load it into a Controller.

I created a library called "GmodServerAction.php" in "Libraries":
PHP Code:
<?php
namespace App\Libraries\GmodServerAction;

class 
GmodServerAction {
    public function __construct()
    {

        
    
}


Now I'm loading it in my Home-Controller:

PHP Code:
<?php namespace App\Controllers;
use 
App\Libraries\GmodServerAction\GmodServerAction;

class 
Home extends BaseShopController
{
    public function 
index()
    {

        $test = new GmodServerAction();

    
        $this
->render("home"$assign);
    }


When I'm trying to open the Homepage it just says:

Class 'App\Libraries\GmodServerAction\GmodServerAction' not found

Any idea? (Btw I'm using XAMPP)
Reply


Messages In This Thread
Can't use costum library - by SimonsCode22 - 10-06-2020, 09:29 AM
RE: Can't use costum library - by nc03061981 - 10-06-2020, 10:46 PM
RE: Can't use costum library - by SimonsCode22 - 10-07-2020, 02:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB