johnw65

Member Since 11 Months Ago

Experience Points
12,400
Total
Experience

2,600 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
96
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 3
12,400 XP
Mar
05
1 day ago
Activity icon

Replied to Change Connection Right After Login

jlrdw,

I've looked at the link... but I'm still not sure why I cannot disconnect the first user. Then when I connect as another user, it creates multiple database connections. So i have the same number of connections that are being created for the initial user and the new user.

Activity icon

Awarded Best Reply on Replace User Authentication With An Authentication_View

I got this to work. So went to the Users.php and changed the following:

protected $table = 'new_table_or_view_name';

That was it! Now it looks at the new table/view

Activity icon

Replied to Replace User Authentication With An Authentication_View

I got this to work. So went to the Users.php and changed the following:

protected $table = 'new_table_or_view_name';

That was it! Now it looks at the new table/view

Activity icon

Replied to Change Connection Right After Login

Here is the link discussing connecting as Oracle proxy user:

https://oracle-base.com/articles/misc/proxy-users-and-connect-through

in my .env file, the user name is test_proxy

The code is a listener right after successful login. Initially connect as text_proxy user which is an Oracle proxy user. Then listed below is a listener code.

$name='test'

$textproxy_user = 'text_proxy[' . $name . ']';
 
        	Config::set('database.connections.oracle.username', $textproxy_user);
        	Log::info('Connecting to Oracle as: '.$textproxy_user);
        	DB::reconnect('oracle');

As this point, I have two connections. Each time I perform a search, it creates new connections for both text_proxy AND test user. Thanks.

Mar
04
2 days ago
Activity icon

Started a new Conversation Change Connection Right After Login

Relatively new to Laravel.

If I want to change the Oracle database connection immediately after it establishes a database connection and destroy the previous connection, which file should I be modifying?

For some reason, I see two simultaneous connections. Seems like it doesn't disconnect the first initial connection. Thanks.

Activity icon

Awarded Best Reply on Remember_Token Remove/Disable

In case someone is encountering a same issue, here is the link that worked even in Laravel 7. Hope it will help others.

https://laravel.io/forum/05-21-2014-how-to-disable-remember-token

Activity icon

Replied to Remember_Token Remove/Disable

In case someone is encountering a same issue, here is the link that worked even in Laravel 7. Hope it will help others.

https://laravel.io/forum/05-21-2014-how-to-disable-remember-token

Activity icon

Replied to TOO MANY DATABASE CONNECTIONS

JLRDW,

I really appreciate you answering and assisting in many of my questions. Although not new to web programming, I am relatively new to Laravel.

In the past projects, we just used web server connection but in this project using Oracle as the database, they want to keep one connection per application they are in.

The reason is that they want to maintain an Oracle user audit trail and the application they are using as well. The last part is working.

Let me take a look at your solution. Again, thanks!

Mar
03
3 days ago
Activity icon

Replied to Remember_Token Remove/Disable

Anthony,

I'm relatively new to Laravel, and I've initially used Laravel's Users table and enabled remember be. However, I am no longer using Users table and so therefore would like to disable remember_token. Which file(s) do I need to modify to make this work.

I'm currently using Laravel 7 and cannot upgrade to Laravel 8 at this point.

Thanks!

Activity icon

Started a new Conversation Remember_Token Remove/Disable

In the process of changing Laravel authentication Users table another table. Is remember_token necessary? Also, would like to remove/disable remember_token.

Activity icon

Replied to TOO MANY DATABASE CONNECTIONS

Jlrdw, Can I maintain 1 connection per User which shows up on v$session table in Oracle database. Any links to pooling? Thanks.

Mar
02
4 days ago
Activity icon

Replied to Replace User Authentication With An Authentication_View

Cahudigv, I want to just change from the Users table to Oracle Authentication_View and would like to know what files that I need to update. Thanks.

Activity icon

Started a new Conversation Replace User Authentication With An Authentication_View

Relatively new to Laravel.

In the process of switching from Laravel's User table Authentication to using Oracle Authentication_View with different column names.

What is the best approach here? Please guide me in the right direction. Do I just disable Auth and create a new Authentication method or just modify the existing Auth? If modification is the way, then what files do I need to update. Thank you.

Activity icon

Started a new Conversation TOO MANY DATABASE CONNECTIONS

The system initially connects as a proxy user, then reconnects as an user. I'm encountering following issues:

  1. Right after login, tried DB::reconnect('oracle') to disconnect as a proxy user, but I can continue to see the proxy user in v$session table.

  2. In the configuration file, set up persistent connection, but after it connects as one of the user, the application creates up to 10 connections. Also, don't understand why it needs so many connections. Preferably would like to maintain one connection. The problem I'm encountering is that the maximum setting for our environment is 8 per user. As a result, I get an error once it exceeds the maximum of 8 connections.

Thank you!

Mar
01
5 days ago
Activity icon

Replied to Check For Access In A Controller

Tykus, Thanks... seems like the middleware is the answer.

Activity icon

Started a new Conversation Check For Access In A Controller

I have a list of controllers, but based on a role ( by performing a query) , I want to provide or deny access for each controllers. What is the best way of accomplishing this?

So before accessing a controller, I want to check if an user is assigned a role. If an user is assigned a role, then they can continue to run the controller. Else, display a message stating they are not authorized and send them back to the main menu.

Thanks.

Feb
25
1 week ago
Activity icon

Replied to Oracle Error: ORA-02391

Made corrections to the the code, so it would call the connection function once. Thanks!

Activity icon

Replied to Oracle Error: ORA-02391

Tray2, In our environment, they can set the maximum to 8. I have a persistent connection, but don't understand why it's creating new connections each time. What am I doing wrong here?

If possible, I would like to use one connection per user. Thanks!

Activity icon

Replied to Oracle Error: ORA-02391

Tray,

The maximum connection is set to 8 by the DBA. In my .env file I have set the oracle to persistent connection.

Activity icon

Replied to Oracle Error: ORA-02391

No maximum connection is set to 8

Activity icon

Started a new Conversation Smart Card Prompt Only Once For A Browser

We have migrated from a traditional Laravel login prompt to a Smart Card (CAC Card) for user authentication. So when an user opens up a new browser in Chrome, it correctly prompts for the smart card. Once an user correctly types in the PIN number, it takes the user to the Login Page.

However, it does it once only. So on another Chrome browser tab, if an user try to go to the web site, it does not prompt for the CAC card and automatically go to the Login Page.

If an user closes the entire browser (ie. Google Chrome), and then go to our main web site, it correctly prompts for the smart card.

How do I resolve this issue? Thank you.

Activity icon

Started a new Conversation Oracle Error: ORA-02391

Currently using Oracle 19c as the RDBMS, and instead of using the Laravel's Users table, the application has been modified and now connects as an Oracle proxy user.

In Oracle, for each proxy users, the maximum connection is set to 8. So when I connect to the application multiple times, I get the following error:

ORA-02391: Exceeded Simultaneous SESSIONS_PER_USER Limit

How should I resolve this issue?

Feb
19
2 weeks ago
Activity icon

Replied to Database Connection - Change

CorvS,

Correct, but I have an Laravel login system and it's a one time database connection change. So making changes to all of the models doesn't seem like the best approach. I want to switch the database connection either during login or right after login. I was looking at LoginController.php .Thanks.

Activity icon

Started a new Conversation Database Connection - Change

Relatively new to Laravel...

During the login, I need to connect as a different Oracle user so the user will have access to the database resources. Where is the best place (ie. LoginController) in the application to perform this operation? Thank you.

Feb
18
2 weeks ago
Activity icon

Replied to Application Level Security

Martin, Thanks! Let me read the documentation regarding policies.

Activity icon

Replied to Application Level Security

Martin,

Thanks, so instead of using middleware, I need to use authorization via policies.

So I can grab a list of application that an user has along with whether its' read access or write access from a user_role table.

So how can I create a policy to perform 3 functions?

  1. Access/Deny a particular application ( I will have many applications). If they accidently enter, route the user back to the main menu.
  2. If user has read/write access, enable update button (for example). For read access, disable update button.
  3. If possible, perform this once so I don't have to query the database each time.

Thanks!

Activity icon

Replied to Application Level Security

CorvS: Thanks for the information. Makes sense!

Activity icon

Started a new Conversation Application Level Security

I'm relatively new to Laravel, and I have a following question.

Currently, different users have access to different applications. I know it's a relatively general question, but what is the best method to make sure that an user can only access their authorized application. I have seen codes where in the constructor method of a controller, they check to see whether an user has authorized access, but not sure whether that is the best approach.

I do have an user roles table which lists all of the applications that an user have access to and also whether it's read or read/write access.

Thanks in advance.

Feb
11
3 weeks ago
Activity icon

Replied to Laravel Authentication - Change Columns

JLRDW,

Thanks for the feedback. Makes sense.

Activity icon

Started a new Conversation Laravel Authentication - Change Columns

Relatively new to Laravel. I am currently using Laravel login screen where I'm using Email and Password to authenticate the users which has been working fine.

Due to changes in the requirement, when the user clicks on the Login button the system need to perform the following:

  1. Get a value from an user's smart card ID (know how it's done) and verify it against one database. If verification fails, then return to login screen with an invalid user message

  2. If verification succeeds, connect to the main database, then pass the smart card id ( instead of email/password) and validate the user.

What is the best way of accomplish this? Which files do I need to modify so it will check just the smart card ID instead of email/password. Thank you for your assistance.

Feb
08
3 weeks ago
Activity icon

Replied to Passing Session Variable And Remove Login

Bobby, So I turned off the Authenticate middleware. So in Laravel, I currently have a login screen which provides a popup alerting the user of some important information. Previously, the user would then enter the user id and password for authentication

I know I'm asking a very basic question.

Now, how would I set up Laravel or which file would I need to create/use grab the CAC information and pass it to Laravel session so my middle ware can see the session information. So would it be public/index.php file that I need to modify?

Thanks!

Feb
05
1 month ago
Activity icon

Replied to Passing Session Variable And Remove Login

Bobby,

Thanks...let me try that.

I just installed ingria/Laravel (auth.x509) and according to their documentation, I can perform the following:

Route::get('/', '[email protected]')->middleware('auth.x509');

So instead of using User ID and Password for authentication, I'm in the processing of replacing this with the CAC authentication which is a new requirement.

So maybe I can use the remove the userid and password from the login screen and just use it to display a popup message letting the user know to insert the CAC card. Then grab the CAC information from an user and if it's authenticated let the user into the application.

John

Activity icon

Started a new Conversation Passing Session Variable And Remove Login

Somewhat new to Laravel and need to perform the following:

  1. Currently using Laravel's User ID and Password to login to the application. Need to disable the User ID and password. How can this be accomplished.

  2. Instead of requesting for User ID and Password, I currently have Apache set up so it will request for a CAC Card instead. In the Laravel/public/index.php need to write a script which would grab the CAC information and pass it to Laravel. I can grab the CAC information, but how can one pass the information into a Laravel session variable . For the middleware, I will be incorporating ingria / laravel-x509-auth .

Thanks in advance.

Feb
01
1 month ago
Activity icon

Replied to Session Timeout - Alert User

Thanks, in my environment I need to set a session (lets say 30 minutes) and redirect to the login page once it expires.

Jan
25
1 month ago
Activity icon

Started a new Conversation Session Timeout - Alert User

Somewhat new to Laravel, but what is the best method of creating a message to let the user know that Session has timed out. And when they click on OK, to automatically send the user to the login screen for the entire website.

Currently, even when the application timeout, the screen is still there with no message which can be confusing to the user. Thanks in advance.

Jan
06
2 months ago
Activity icon

Replied to Setting A Global Path For Laravel Website

Thanks, appreciate it!

Activity icon

Replied to Setting A Global Path For Laravel Website

I think I found the answer on this link: https://stackoverflow.com/questions/35683562/how-to-access-the-laravel-env-variables-inside-javascript. Hope it will help others.

<script>

var name = '{{ env('NAME') }}';

alert(name);

</script>
Activity icon

Replied to Setting A Global Path For Laravel Website

We are using Jasper Reports, and my coworker is passing the subreport path via jQuery. Thanks.

Activity icon

Replied to Setting A Global Path For Laravel Website

Thanks, relatively new to Laravel.

Once I set the path, what is the best method for calling it using jQuery?

Jan
05
2 months ago
Activity icon

Started a new Conversation Setting A Global Path For Laravel Website

We are curently using Jasper Studio to generate Jasper Report, and I need to pass the path for image and sub-reports. Currently, we are passing the entire web site path on the development server which is hard coded. For example, the path is /var/html/laravel/public/report/. We are having issues, passing relative path, which I prefer since the path will change once we go to production server.

So where can store the path, lets call it report_path = /var/html/laravel/ so I can easily access them? Thanks.

Activity icon

Replied to Updating From Development To Test Environment

I know, Composer is not allowed in our production environment.

Activity icon

Started a new Conversation Updating From Development To Test Environment

I'm relatively new to PHP/Laravel.

My current setup is a Development Environment which will have Composer installed. Once I finish development, I would like to "transfer" the files to the Production environment. Production environment will not have Composer installed.

So what is the best approach of updating the Production environment. For example, can I copy the "required" folders from the Development Server to the Production Server? Thanks.

Dec
17
2 months ago
Activity icon

Replied to Laravel Controller: Convert Null Value To Empty String

AndreasBakir,

I got it to work by adding a space between ''. Thanks!

Activity icon

Replied to Encryption Of Sensitive Data

Martin, I understand your point, especially since it's HTTPS. However, when passing hidden fields that are sensitive, it's a requirement that I must follow. Other websites in our environment are encrypting sensitive hidden fields. Again, it's a requirement.

Activity icon

Replied to Encryption Of Sensitive Data

Martin Bean,

I understand your point, but without getting into specifics, I need to encrypt sensitive data that are passed as hidden field for example. It's a requirement.

Thanks.

Activity icon

Replied to Encryption Of Sensitive Data

Automica,

The environment we are in does uses HTTPS, but was looking to see whether I can encrypt "sensitive data", especially any hidden fields that is passing sensitive data.

Activity icon

Started a new Conversation Encryption Of Sensitive Data

I have a general question regarding encrypting sensitive data such as the primary key ID and other sensitive data. Currently, I am using ajax to POST and GET information from the database.

  1. What is the best approach of method of encrypting all of the data. For example, once I retrieve all of the data via ajax, I can see all of the JSON data being returned via Network or Console. At minimum, I want to encrypt the Primary Key ID and sensitive data including PII data. Also, I want to perform an encryption during POST to the controller. At minimum, I need to encrypt the primary key.

  2. Also, I would like to encrypt the URL values being passed as well.

Thank you.

Dec
16
2 months ago
Activity icon

Replied to Laravel Controller: Convert Null Value To Empty String

Nakov,

I'm relatively new to Laravel, so this is the answer I was looking for!

So instead of doing at a controller level, is there a way to possibly use middle ware to accomplish this? Thank you again!

John

Activity icon

Started a new Conversation Laravel Controller: Convert Null Value To Empty String

In my controller I have the following:

       //select2 requires id and text; id need to be unique

       $search_criteria = strtoupper($request->search_criteria);
      

        if(request()->ajax()){

           // $search_criteria = strtoupper($search_criteria);
            
             $search = DB::table('test')
                
              
                ->get('name', 'dob, ‘license_no’, 'address');

                 return response()->json(array('result' => $search));
            }
      }

The problem I'm encountering is that some of the columns are returning the value of NULL. How can I convert NULL to empty string.

Also, the value of 'NULL' is being displayed on the report as well.

If possible, if I can convert all of the NULL to an empty string will be even better.

Thank you.

Activity icon

Replied to Select2 Not Passing Search Parameter

Automica,

Thanks! I knew it was something basic!

John