Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

screwtape_mk's avatar

my laravel 7 application references a table from another application

I have an application deployed on a shared hosting server. I have a sign up form that fails and has the error: myapp_whm.appscheduler_users doesn't exist

My .env file:

APP_ENV=development
APP_KEY=base64:8/********************=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://myapp.com

DB_HOST=http://myapp.com
DB_DATABASE=myapp_whm
DB_USERNAME=**********
DB_PASSWORD=**********

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

The authcontroller uses the following:

<?php

namespace App\Http\Controllers;

use Auth;
use App\Models\User;

use Illuminate\Http\Request;
use Session;
...

and the User Model:

<?php namespace App\Models;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;

use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;


class User extends Model implements AuthenticatableContract
{

	use Authenticatable;

	
	protected $table = 'users';

	
	protected $fillable = [

...

0 likes
5 replies
bobbybouwmann's avatar

Are you sure you didn't create a table called appscheduler_users?

Can you share the full error?

screwtape_mk's avatar

I did, in a separate domain of a different cpanel account? what's confusing me is where in my current app should i be updating to the right table users not appscheduler_users

screwtape_mk's avatar

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myapp_db.appscheduler_users' doesn't exist (SQL: select count(*) as aggregate from `appscheduler_users` where `email` = [email protected])

bobbybouwmann's avatar

Are you sure it's using that User model?

Your model looks correct, including the table name. So that is not the issue. It must happen somewhere else. Did you search for the appscheduler_users string in your application for any clues?

screwtape_mk's avatar
screwtape_mk
OP
Best Answer
Level 2

actually it was there in the controller all along:

'email'=>'required|unique:appscheduler_users|email|max:255',

Please or to participate in this conversation.