authentication - Laravel Multi-auth (multiple user tables) from same login

I plan to develop a system that has three user types (admin, business, personal). I want to have each user types information stored in a separate table for easy access and to reduce the number of blank fields (if they were all in one table).Having looked at multiple Multi-auth packages available for Laravel, they all appear to be insisting on an approach with URLs like the following:/admin/login/business/login/personal/loginIdeally, I would like to take an approach where the standard Laravel Auth /login can be used meaning that all users log in...Read more

Laravel 4: Separate superadmin auth

I want to be able to have a separate login mechanism for admin users than our regular users. Authentication for general users is the default Laravel way. Using a users table and user model.For our internal admin section (superadmin), I would prefer to use basic http authentication and not use the users table but no table at all or a new superadmins table containing only the users that can login to the superadmin.What would be the best approach? Is there some way to hardcode a few superadmin login credentials or would a superadmins table be requ...Read more

best way to do laravel multi auth

I wonder, which way is the easiest and the best for making multi auth (admin and also multiple type of users) for Laravel. Is it okay to put them all in users table and then use field role to check their privilege via if statement? Or I need to make guard or middleware for admin?...Read more

How to access session in different requests in laravel

I save session variable in one controller and am able to fetch that after saving it.class OrderController extends Controller{ public function order(){ echo "<pre>"; Session::put('shakir','shakir'); //Session::get('shakir'); print_r(Session::all()); exit; } }and the output is:Array( [_token] => LaQpxgzrhg0PX4YyGWmOZZpv1j3Ofj8jmEVQwpgD [_previous] => Array( [url] => ) [PHPDEBUGBAR_STACK_DATA] => Array () [_flash] => Arr...Read more

laravel - Creating a row in two tables with one form. How do I add IDs connecting them?

I'm using laravel 5.6 and I'm trying to insert a row into two different tables and link them together inside public function store()Here's what I have: public function store(Request $request) { $this->validate($request, [ 'name' => 'required', 'email' => 'required', 'project' => 'required', 'project_type' => 'required', 'budget' => 'required' ]); $client = new Client; $project = new Project; $client->name = $re...Read more

laravel - ErrorException thrown with message "htmlspecialchars() expects parameter 1 to be string, object given Stacktrace: #59

ErrorException thrown with message "htmlspecialchars() expects parameter 1 to be string, object given (View: G:\xampp\htdocs\Blog\resources\views\songs\index.blade.php)"Stacktrace:#59 ErrorException in G:\xampp\htdocs\Blog\vendor\laravel\framework\src\Illuminate\Support\helpers.php:577#58 ErrorException in G:\xampp\htdocs\Blog\vendor\laravel\framework\src\Illuminate\Support\helpers.php:577#57 htmlspecialchars in G:\xampp\htdocs\Blog\vendor\laravel\framework\src\Illuminate\Support\helpers.php:577#56 e in G:\xampp\htdocs\Blog\storage\framework\vi...Read more

laravel - Bootstrap card-header doesn't work

I'm using Laravel 5.5 and looking at the Bootstrap's 4 documentation i found that the card components works just fine for the things i want to do. Either way, there is an error while i'm trying to create a basic card model:<div class="container"> <div class="row col-md"> <div class="card"> <div class="card-header"> Companies </div> <ul class="list-group list-group-flush"> <li class="list-group-item">Cras justo odio...Read more

How to change /home after login in a laravel project

I am new in laravel framework. I install the Auth Class in my project. So when I login in my project it goes to dashboard but url is ('/home'). I want to change this path and after login I want that it goes ('/dashboard'). For that jobs, which file I want to change? I have find 4 file where /home is decleared. Thats are web.php, LoginController.php, HomeController.php, RedirectIfAuthenticated.php. Which file I will change? or any more file there?Web.php filehomeController.php fileloginController.php fileredirectIfAuthenticated.php file...Read more

saml - Laravel app as IDP, Azure AD B2C as SP using SAML2

i have installed this package, which will turn my laravel into IDP. My SP will be an Azure AD b2c which will be handled by another IT company.Objective :Users logged in into my application and click a link to the azure ad b2c. The Azure then will request and authenticate to my laravel using SAML2. my laravel then will send some information to Azure so that azure can register or log this person.Question : Im quite confuse about the SP provider settings for Azure, is there any documentation about this?....Read more

laravel - Codename One data upload works on Android phone but fails on Iphone 4

I am trying to build an app with Codename One that uploads to a server a photo captured from the camera and then shrunk to 300x300 along with GPS coordinates. On the simulator (Iphone or ANdroid) everything works well, the photo is received and stored on the server, the other data as well. After building the Android app it also works fine on Android.However when it comes to building the iOS app and testing it on my Iphone 4, the photo is never received. Indeed the data does not pass the validator in Laravel :$validator = Validator::make($submit...Read more

laravel - AWS Cloudfront causing CSRF Token Mismatch Exception

Alright hello, I have deployed my Laravel app on AWS ELB and I set up Cloudfront distribution for my app. Now I am facing CSRF Token mismatch. I know that this error can be caused by multiple config values that may be wrong. Now I have managed to fix this issue by myself in the past, but it was a long time ago and I don't know what I did and where. So if you have some tips on what could be wrong and where, then definitely send them my way. ThanksEDIT: The exception happens after switching to Cloudfront. My problem is to get it working with Clou...Read more

Laravel Add Additional Rows to an Eloquent Object

I want to add an "On This Day" feature which should display records from The Previous Years. I have some Entries, all of them have a 'date' attribute. This is what I've been trying so far:public function filterByDay($id){ $entries = Entry::where('id', $id)->get(); $currentDay = $entries[0]->date; $oldestYear = Entry::orderBy('date','asc')->first()->date; $previousYear = $currentDay; while($previousYear >= $oldestYear ){ $previousYear = $currentDay->subYear(); $entries->push(Entry::where('date', ...Read more

ssl - How to get https certificate working on local Laravel Homestead site

I'm getting this problem:The error that I'm seeing in Windows 10 Chrome Version 65.0.3325.181 (Official Build) (64-bit) is: Your connection is not private Attackers might be trying to steal your information from ((mysite)) (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_AUTHORITY_INVALID This page is not secure (broken HTTPS). Certificate - missing This site is missing a valid, trusted certificate (net::ERR_CERT_AUTHORITY_INVALID).Firefox Quantum 59.0.2 (64-bit) says: Your connection is not sec...Read more