我有 3 个带有 3 个数据库的 laravel 应用程序。应用程序 1 是用于身份验证的登录(注册和登录),并且仅连接到用户数据库。
应用程序 2 允许用户执行一些基本操作并连接到用户和 App2 数据库
应用程序 3 允许用户执行一些不同于应用程序 2 的其他操作,并连接到用户和 App3 数据库
现在我的问题是允许用户登录一次通过任何应用程序并自动登录到其他应用程序
更像是拥有一个适用于所有应用程序的 Google 帐户。
应用程序 1 将通过主 URL 访问
www.kokoka.com
Run Code Online (Sandbox Code Playgroud)
而其他人将通过
health.kokoka.com
school.kokoka.com
Run Code Online (Sandbox Code Playgroud)
我试过 https://github.com/awnali/SSO-laravel-5
我还更改了 session.php 中的域
'domain'=>'.domain.dev'
Run Code Online (Sandbox Code Playgroud)
一切都无济于事
我希望能够将字符串中的\ r \ n字符转换为新行
示例John现在正在等待。\ r \ n我们能告诉您有关他的情况吗?\ r \ n他是一个伟大的人
转换成
约翰现在在等。
我们能谈谈他吗。
他是一个伟大的人
尝试了这个但无济于事
nl2br(text: string) {
return text.replace(new RegExp('\r?\n','g'), '<br />');
}
Run Code Online (Sandbox Code Playgroud) 我刚读完亚当·弗里曼(Adam Freeman)的Pro ASP.NET MVC书籍,作为对ASP.NET MVC的介绍。
但是,我遇到了必须连接多个表但无法使用Freeman方法的情况。
请在下面查看我的代码
EFEmployeeRepository.cs(在我的具体文件夹中)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HRMS.Domain.Abstract;
using HRMS.Domain.Entities;
namespace HRMS.Domain.Concrete
{
public class EFEmployeeRepository : IEmployeesRepository
{
private EFDbContext context = new EFDbContext();
public Employee getEmployeeByID(int User_ID)
{
// I want to Join the Employee Table with the User Table to Get Employee Details
Employee employee = context.Employees.FirstOrDefault(p => p.User_ID == User_ID);
return employee;
}
}
}
Run Code Online (Sandbox Code Playgroud)
IEmployeesRepository.cs(摘要文件夹)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; …Run Code Online (Sandbox Code Playgroud) 我一直在使用PHP一段时间,但不得不转向ASP.NET MVC
我想获得像下面这样的数组
Order[0]
=>MaterialName="MName"
=>MaterialType=1
=>MaterialDescription="Description"
=>Roles[0]
=>"Televsion"= "ABCTV"
=>"Radio"= "ABC Radio"
=>Roles[1]
=>"Televsion"= "DEFTV"
=>"Radio"= "DEF Radio"
Order[1]
=>MaterialName="MName"
=>MaterialType=1
=>MaterialDescription="Description"
=>Roles[0]
=>"Televsion"= "ABCTV"
=>"Radio"= "ABC Radio"
=>Roles[1]
=>"Televsion"= "DEFTV"
=>"Radio"= "DEF Radio"
Run Code Online (Sandbox Code Playgroud)
我可以通过制作第一个数组并在之后追加其他数据来在PHP中生成这个.
并循环以获取其中的值.
我希望在ASP.NET MVC中完成此操作,但无济于事.
数组不允许附加名称和字典.