Answer the question
In order to leave comments, you need to log in
Why is the class not in Lavarel?
Hello! Can you tell me why this file is throwing an error Class 'app\Http\Controllers\Controller' not found
<?php
namespace App;
use DB;
use app\Http\Controllers\Controller;
class Site extends Controller
{
function __construct($domainid , $userid , $vhostid)
{
$this->domainid = $domainid;
$this->userid = $userid;
$this->vhostid = $vhostid;
}
/**
*
*
* @return Response
*/
private function checkbelong ($domainid, $userid , $vhostid)
{
$checkdom = DB::table("domain")
->select('unid')
->where("userid", $userid)
->where ("unid" , $domainid)
->where("type" , "unlinked")
->get();
$checkvh = DB::table("vhosts")
->select('unid')
->where("userid", $userid)
->where ("unid" , $vhostid)
->get();
var_dump($checkvh);
if (!$checkvh OR !$checkdom) {return $error = "Trying to link foreign domain";}
else {return true;}
}
private function checkexist ($domainid,$vhostid) {
$checkdom = DB::table("domain")
->select('unid')
->where ("unid" , $domainid)
->where("type" , "unlinked")
->get();
$checkvh = DB::table("vhosts")
->select('unid')
->where ("unid" , $vhostid)
->get();
if (!$checkvh OR !$checkdom) {return $error = "Trying to link non-existent domain";}
else {return true;}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question