riaanv1987

riaanv1987

Web Developer at The Internet

Member Since 2 Years Ago

Langebaan, Western Cape

Experience Points
3,780
Total
Experience

1,220 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
36
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 1
3,780 XP
Mar
07
7 months ago
Activity icon

Replied to Multiple Query Results Not Merging

Fixed my own problem heheh thanks anyhow.

public function kryAandele()
{
    $user = Auth::user();
    $share = $user->shares()->where('status_id', 3)->get();
    $alternates = $user->alternates()->where('status_id', 3)->get();
    $shares = $share->merge($alternates);
    return DataTables::of($shares)->editColumn('created_at', function ($shares){
        return $shares->created_at->toDateString();
    })->editColumn('status_id', function ($shares){
        return $shares->status->name;
    })->editColumn('sert_nommer', function ($shares){
        return strval($shares->sert_nommer);
    })->toJson();
}
Activity icon

Started a new conversation Multiple Query Results Not Merging

HI there I have a table that I run a query on to get all the users records in the table and then I return a datatable with the data. This works 100%. My problem is I need to add data to this datatable from another table in the db as well currently I have tried the following but I just get a datatable error. Both tables structure is the same. And I just can't get the table to display the information of both tables.

public function kryAandele()
{
    $user = Auth::user();
    $share = $user->shares()->where('status_id',3)->get();
    $alternates = $user->alternates()->where('status_id', 3)->get();
    $shares = $share->merge($alternates);
    return DataTables::of($shares)->editColumn('created_at', function (Share $share){
        return $share->created_at->toDateString();
    })->editColumn('status_id', function (Share $share){
        return $share->status->name;
    })->editColumn('sert_nommer', function (Share $share){
        return strval($share->sert_nommer);
    })->toJson();
}
Mar
06
7 months ago
Activity icon

Replied to Please Could Someone Help Me With This File Upload Problem

@LOSTDREAMER_NL - Also i tested the code still the same problem! It happens even if both files are selected and when i press upload it goes and goes and then 500:

Here is the stacktrace after implementing your changes @lostdreamer_nl

[2019-03-06 16:14:57] local.ERROR: syntax error, unexpected '$betaling' (T_VARIABLE) {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): syntax error, unexpected '$betaling' (T_VARIABLE) at /home/ndo0ayouz18t/eureka/app/Http/Controllers/BetalingsController.php:49) [stacktrace]

Activity icon

Replied to Please Could Someone Help Me With This File Upload Problem

@LOSTDREAMER_NL - Yes I ilve in south africa hehehe thanks for the reply, Let me see if this resolves my issue and I will report back. Dankie vir jou tyd :-)

Activity icon

Started a new conversation Please Could Someone Help Me With This File Upload Problem

HI I was just on stack exchange and nearly got devoured by some dude who clearly was not in the mood to help...either way...

This is the code block that I am having problems with....also don't rail on me on how badly written it is. This controller depends on actions of others so all this does the work it is suppose to do.

public function betaling(Request $request) { // Skep 'n nuwe betaling $betaling = new Betaling(); // Blank Array $filenames = []; // Check die files if($request->file('aandeel_pop')) $filenames[] = $request->file('aandeel_pop'); if($request->file('nfc_pop')) $filenames[] = $request->file('nfc_pop'); // Vind die user $user = Auth::user();

    foreach($filenames as $file) {
        if(!empty($file)){
            $filename = time() . $file->getClientOriginalName();
            $file->move(storage_path('/app/public/pop/uploads/'), $filename);
            $filenames[] = $filename;
        }
    }
    // Set die waardes vir die betaling
    $betaling->trans_nommer = $request->trans_nommer;
    $betaling->user_id = $user->lid_nommer;
    $betaling->aandeel_pop = $filenames[2];
    $betaling->nfc_pop = $filenames[3];
    $betaling->uploaded = Carbon::now();
    $betaling->save();

    // Update die transaksie
    $transaksie = Transaksie::where('trans_nommer', $request->trans_nommer)->firstOrFail();
    $transaksie->status_id = 6;
    $transaksie->is_paid = 1;
    $transaksie->aandeel_pop = $filenames[2];
    $transaksie->nfc_pop = $filenames[3];
    $transaksie->save();

    $transaksie->user->notify(new BetalingGelaai($transaksie));

    // Merk die sertifikaat as verkoop
    if($request->sert_nommer > 1003333 ){
        $sertifikaat = Alternate::where('sert_nommer', $request->sert_nommer)->firstOrFail();
        if($sertifikaat){
            $sertifikaat->is_paid = 4;
            $sertifikaat->save();
        }
    }elseif($request->sert_nommer < 1003604) {
        $sertifikaat = Share::where('sert_nommer', $request->sert_nommer)->firstOrFail();
        if($sertifikaat){
            $sertifikaat->is_paid = 4;
            $sertifikaat->save();
        }
    }elseif($request->sert_nommer < 50000) {
        $sertifikaat = Aandeel::where('sert_nommer', $request->sert_nommer)->firstOrFail();
        if($sertifikaat){
            $sertifikaat->is_paid = 4;
            $sertifikaat->save();
        }
    }
    return redirect()->back()->with('success','Betaling was suksesvol geplaas!');
}

The problem that i am having is that the file upload work for some users and other users get a 500 when posting the files. I have two upload fields on the form and when i press upload it gives 500. On the other hand when i start uploading from the bottom to the top it works. Can someone please shed some light on this for me

May
11
2 years ago
Activity icon

Started a new conversation Can't Display My Pusher Message

Hi I have recently started experimenting with Pusher and Laravel, right now pusher is receiving my data and I can see it in the console on the pusher website. Where am I going wrong here?

My current Javascript looks like this:

Pusher.log = function(msg) { console.log(msg); };

function getNotification(data){
    message = data.message;
    alert(message);
}

var pusher = new Pusher('{{env('PUSHER_APP_KEY')}}',{
    cluster: 'eu',
    encrypted: true,
});

var channel = pusher.subscribe('admin-channel');
channel.bind('Welcome', function (data) {
    getNotification(data);
});

And My Controller has the following method to trigger the event

public function index(){ event(new Welcome('Welcome back, '.Auth::user()->name)); return view('admin.index'); }

my Welcome event looks like this