johnw65

johnw65

Member Since 5 Months Ago

Experience Points
9,920
Total
Experience

80 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
92
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.

Level 2
9,920 XP
Aug
19
4 weeks ago
Activity icon

Awarded Best Reply on Display Oracle Blob (Image)

I found the solution. To view an Oracle Blob field , just include the following code in the view where pic is the blob field.

@foreach ($data as $row) <img src="data:image/jpg;base64,{{ chunk_split(base64_encode($row->pic)) }}" @endforeach

Activity icon

Replied to Display Oracle Blob (Image)

I found the solution. To view an Oracle Blob field , just include the following code in the view where pic is the blob field.

@foreach ($data as $row) <img src="data:image/jpg;base64,{{ chunk_split(base64_encode($row->pic)) }}" @endforeach

Activity icon

Replied to Display Oracle Blob (Image)

Sinnbeck, Had to go back and edit my question since all of the codes were hidden. Thanks in advance.

Aug
18
1 month ago
Activity icon

Started a new Conversation Display Oracle Blob (Image)

I'm new to Laravel, but I have the following code on my controller below.

namespace App\Http\Controllers; use Validator;

use Illuminate\Http\Request; use DB;

use App\Images; use Image;

class DisplayImageController extends Controller {

 public function index()

{
    {

$data = DB::table('image_pic_table')->get();
           
    return view('displayimage', compact('data'));
}
        
   
}

}

Now on my displayimage.blade.php, I just want to display the jpg images from the Blob column using foreach loop. The name of image_pic_table have two columns: contact_id (integer), and picture which is a blob column so I want to be able to display both the contact_id along with the picture in a table format.

Thanks in advance.

Aug
12
1 month ago
Activity icon

Replied to Need To Track And Monitor Oracle DB Connection

We are migrating from a legacy system to a web application and it's a requirement. So I need to be able to actually see the database connection for each Oracle database user in a v$session.

Aug
11
1 month ago
Activity icon

Started a new Conversation Need To Track And Monitor Oracle DB Connection

I'm new to Laravel, and want to perform the following:

  1. Currently, my development website connect as an 'Admin' user, but want to know if there is a way to log into the web application using their database username and password. So when they enter their username and password, that it will connect to the database using both the user name and password

  2. The reason is that that we need to monitor user activity at the database level, and would like to know who is currently connected to the database. Thank you in advance.

Jul
16
2 months ago
Activity icon

Awarded Best Reply on Multiple Queries

I think I found the answer by Googling:

Route::get('member', '[email protected]');

class MemberController extends BaseController {

public function showForm(){
    $problemsCat1 = $this->problems->getProblemsByCategory(1);
    $problemsCat2 = $this->problems->getProblemsByCategory(2);
    $cities = $this->city->getAllCitites();
    return View::make('memberForm', compact('problemsCat1', 'problemsCat2', 'cities'));
}

}

Activity icon

Replied to Multiple Queries

I think I found the answer by Googling:

Route::get('member', '[email protected]');

class MemberController extends BaseController {

public function showForm(){
    $problemsCat1 = $this->problems->getProblemsByCategory(1);
    $problemsCat2 = $this->problems->getProblemsByCategory(2);
    $cities = $this->city->getAllCitites();
    return View::make('memberForm', compact('problemsCat1', 'problemsCat2', 'cities'));
}

}

Activity icon

Started a new Conversation Multiple Queries

I'm new to Laravel.

I have a data entry form that requires multiple queries to populate the data entry form but also the drop down from different tables. What is the best way of populating the form including the drop downs without using AJAX. Lets say that I have one controller to display information for the main form, and have 5 different drop downs that requires 5 different queries using Controller/Query Builder. How can this be accomplished? How would I set up the routes? Thank you advance.

Jul
15
2 months ago
Activity icon

Replied to Basic Drop Down

Michael,

I got the following error: Call to a member function isNotEmpty() on string.

I know this can't be this hard, but I'm new to Laravel....

How can I test whether it's retrieving data from $products from main view. Do I need to include this in my web.php route? Thanks in advance.

Activity icon

Replied to Basic Drop Down

James, thanks for you assistance. When I ran the code, I received the following error:

Invalid argument supplied for foreach()

So do I need to add this route to my web.php. Apologize for asking basic question... I have years of programming experience, but new to Laravel.

Activity icon

Started a new Conversation Basic Drop Down

I'm new to Laravel and is currently using Laravel 7. I just need to create a dropdown (product_id, description) , not using ajax, so users can select and eventually update then entire form.

So if I'm using this example controller:

public function test (Request $request)

{

$products = Product::pluck('name', 'id');

$selectedID = 2;

return view('main.index', compact('id', 'products'));

}

My main.blade.php I have the drop down

Select Product @foreach ($products as $key => $value)
<option value="{{ $key }}" {{ ( $key == $selectedID) ? 'selected' : '' }}> 

    {{ $value }} 

</option>

@endforeach

when I try to run this, it cannot find $products on my main.blade.php and end up with an error. How does it know that $products is coming from this controller? Doesn't seem like it's calling the controller.

Also, how can I dynamically pass the selectedID, so I can set it to the initial value on a form retrieve.

So do I need to add additional routes for this? I'm at a lost. Thanks!

Jun
26
2 months ago
Activity icon

Replied to Encryption Of ID

I think I'm going to use a combination of methods: Authorization and UUID. Really appreciate your assistance!

Activity icon

Replied to Encryption Of ID

I understand but since this is considered a "unique value", I believe I then will need to encrypt this value.

Activity icon

Replied to Encryption Of ID

In an environment that I'm working on, sensitive data needs to be encrypted including the primary key (ID) and other sensitive data such as SSN. That is just a requirement. If possible, I really don't want to pass the primary key value, but I would need to delete and update data without the primary key. So when using a database, I currently have a hidden ID field for each row and when an user updates the form, it passes the primary key (ID) to update and delete. So if I can just update records without passing any data which identifies that particular row (ID) that is preferable. If the ID needs to be passed, then it needs to be encrypted.

Activity icon

Replied to Encryption Of ID

Thank you for the feedback, but lets say I'm trying to update a User table I want to update an user with id = 3 via form, then how would I implement this? In my controller, I have an update statement:

update users set first_name='Test' where ID = ID.

Thanks in advance.

Activity icon

Started a new Conversation Encryption Of ID

I'm new to Laravel, and is currently using Laravel's Datatable. It's a requirement that I encrypt the value of a primary key (ie. ID) which could be either passed as a hidden field or in an URL. What is the best way to implement this. Currently, in the Datatable, I have it hidden, but one can still view the passed value of an ID via browser's Developer's Tool.

Even when I'm not using Laravel's DataTable, I like to encrypt certain fields including the primary key for the entire web site. Thank you in advance.

Activity icon

Replied to Track User Links

Thank you !

Jun
23
2 months ago
Activity icon

Started a new Conversation Track User Links

I'm relatively new to Laravel so this is likely a simple questions. I have a database driven menu and each of the menu have an id associate with it. There are many links. I want to keep track of all of the links that a user visited using an insert statement. What is the best way to implement this? Do I create a listener and pass the ID so I can perform an insert statement? Thanks in advance.

May
26
3 months ago
Activity icon

Started a new Conversation Oracle Sequence Number

I'm new to Laravel, and I need to insert an oracle sequence number as the product_id then insert them in Test_Table.

$test_key= DB::select('SELECT new_sequence.NEXTVAL as seq_gen FROM DUAL');

DB::table('Test_Table')->insert(['product_id'=>$test_key, 'second'=>$second, 'another_field'=>$third);

I'm getting error when trying to pass $test_key... it's an array and not an integer. How can I just convert it to an integer. Thanks

May
19
3 months ago
Activity icon

Replied to How To Connect And Login As An Oracle User

I'm using the Yajra OCI-8 driver, your script did work.

DB::connection('oracle')->raw('DBMS_Session.Set_Role('ALL')');

However, I want the system to connect as an actual Oracle database User so the system can have database level audit trail for each user.

May
12
4 months ago
Activity icon

Started a new Conversation How To Connect And Login As An Oracle User

I'm new to Laravel, and is currently using Laravel 7.

Immediately after a successful user login, how can I immediately connect/reconnect as an actual Oracle User rather than as a web application user then execute DBMS_Session.Set_Role('ALL') which will grant the current user all roles.

It's a requirement and also want to be able to keep an audit trail on each Oracle users until the user logs out. The audit must be performed at the database level. Thanks in advance.