How to override a Laravel model's default table name?
We have to pass protected $table = 'YOUR TABLE NAME'; in your respective Model
BY Best Interview Question ON 06 May 2020
Example
namespace App;
use Illuminate\Database\Eloquent\Model;
class Login extends Model
{
protected $table = 'admin';
static function logout() {
if(session()->flush() || session()->regenerate()) {
return true;
}
}
}