Rhynel

Rhynel

Member Since 2 Months Ago

Cebu City

Experience Points
330
Total
Experience

4,670 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
0
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
330 XP
Sep
17
3 weeks ago
Activity icon

Started a new conversation Class App\Http\Controllers\Techzadmin\Request Does Not Exist

public function updateStatus(Request $status, $id){

 $Orders = Orders::find($id);
      $Orders->access_status = $status['status'];
      $Orders->save();
 

}

Route::get('orders/update/{id}/status/{status}', 'Techzadmin\[email protected]');

Link http://localhost/sm.com/public/mywebsite/orders/update/1/status/Delivered

Sep
16
4 weeks ago
Activity icon

Replied to How To Close All When I Click Someone Open?

On the code above how to implement .siblings() method?

Activity icon

Replied to How To Close All When I Click Someone Open?

I think you are right

Activity icon

Started a new conversation How To Close All When I Click Someone Open?

// Add event listener for opening and closing details

$('#laravel_datatable tbody').on('click', 'td.details-control', function () {

            var tr = $(this).closest('tr');
            var row = table.row( tr );

            if ( row.child.isShown() ) {
                // This row is already open - close it
                row.child.hide();
                tr.removeClass('shown');
            }
            else {
                // Open this row
                row.child( format(row.data()) ).show();
                tr.addClass('shown');
            }

     });
Activity icon

Replied to Array And Object How To Solve This? Any Help?

return explode(', ', $Orders->Status);

I simply use this to make an array. Sorry I thought it was an Object. . It was a string ^^ I solve it!

Sep
13
1 month ago
Activity icon

Replied to Only Get Firt Letter Passed In 2nd Nested Ajax Datatables Data Stored At Status1

I found the solution now

->addColumn('status2', function ($Orders) { return explode(', ', $Orders->quantity); })

I explode the data I thought it was an Object.. It's just a stirng HAHAHAHAHA

Activity icon

Started a new conversation Array And Object How To Solve This? Any Help?

return ([ "First Data", "Second Data" ]);

It works fine

But when I use this

$Orders->Status = ["First Data", "Second Data"]

From Database

return $Orders->Status;

It print the whole thing

The output is

"First Data", "Second Data"

Not an array. How to make it an array or separate 1st data and the second for a loop? How to make an array of an Object?

Activity icon

Replied to Only Get Firt Letter Passed In 2nd Nested Ajax Datatables Data Stored At Status1

My problem is when I use this

return ([ "First Data", "Second Data" ]);

It works fine

But when I use this

$Orders->Status = "First Data", "Second Data"

From Database

return ([ $Orders->Status ]);

It print the whole thing

The output is

"First Data", "Second Data"

Not an array or loop. How to make it a loop?

Activity icon

Replied to Only Get Firt Letter Passed In 2nd Nested Ajax Datatables Data Stored At Status1

Yah if I use that it works fine I think the json data only print [

in the other case print only the first letter. I wrote status1 at the very top

// The row value of status1 is foo BarBad from database

Activity icon

Started a new conversation Only Get Firt Letter Passed In 2nd Nested Ajax Datatables Data Stored At Status1

// In Controller

// The row value of status1 is foo BarBad from database

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

     $Orders = Orders::all();

            return Datatables::of($Orders)->addColumn('ordered_at', function ($Orders) {
                    return $Orders->ordered_at ? 
        with(new Carbon($Orders->ordered_at))->format('l jS \of F Y, h:i:s A') : '';
                })
                ->addColumn('action', 'orders.action_button')
                ->addColumn('amount', function ($Orders) {
                                 return number_format($Orders->amount, 2);
                             })
                 ->addColumn('status2', function ($Orders) {
                    return [
                        "foo BarGood"
                    ];
                })
                ->rawColumns(['action'])
                ->addIndexColumn()
                ->make(true);
  }

}

// View

 <div>
        <table id="laravel_datatable" class="table table-bordered dataTable dtr-inline"
               role="grid" width="100%">
            <thead class="alert-heading">
            <tr>
                <th width="70px"></th>
                <th>Order No.</th>
                <th>Order Date</th>
                <th>Retail Price</th>
                <th>Mode of Payment</th>
                <th>Qty</th>
                <th>Status</th>
                <th width="140px">Action</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    function format ( d ) {
        console.log(d.status2);
        var trs='';
        $.each($(d.status2), function(key,value){
            trs+='<tr>' +
                    '<td>'+d.status2[key]+'</td>' +
                 '</tr>';
        })

        return '<table class="table table-border table-hover">'+
                '<thead>'+
                    '<th width="140px">Send To</th>'+
                    '<th width="140px">SKU</th>'+
                    '<th width="140px">Product</th>'+
                    '<th width="70px">Image</th>'+
                    '<th width="140px">amount</th>'+
                    '<th width="140px">Action</th>'+
                '</thead>' +
                '<tbody>' +
                    trs+
                '</tbody>' +
                '</table>';
    }

$(document).ready( function () {

        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });

        var table = $('#laravel_datatable').DataTable({
            processing: true,
            serverSide: true,
            ajax: {
                url: "@if(routeGet() == 'techzadmin.orders'){{ techzadmin_url('orders') }}@endif",
                type: 'GET',
            },
            columns: [
                {
                    "className":      'details-control',
                    "orderable":      false,
                    "data":           null,
                    "defaultContent": ''
                },
                { data: 'order_number', name: 'order_number',
                    "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                        $(nTd).html("<a href='"+oData.order_number+"'>"+oData.order_number+"</a>");
                    }
                },
                { data: 'created_at', name: 'created_at' },
                { data: function (data, type, dataToSet) {
                        return "&#8369;"+ data.amount;
                    } },
                { data: 'mode_of_payment', name: 'mode_of_payment' },
                { data: 'mode_of_payment', name: 'mode_of_payment' },
                { data: 'status', name: 'status' },
                { data: 'action', name: 'action', orderable: false, searchable: false },
            ],

            order: [[0, 'asc']]
        });

        $('#laravel_datatable tbody').on('click', 'td.details-control', function () {
            var tr = $(this).closest('tr');
            var row = table.row( tr );

            if ( row.child.isShown() ) {
                // This row is already open - close it
                row.child.hide();
                tr.removeClass('shown');
            }
            else {
                // Open this row
                row.child( format(row.data()) ).show();
                tr.addClass('shown');
            }
        });

// Only stored letter f instead of foo BarBad of status1. But if I chose status2 the output is foo BarGood

Sep
04
1 month ago
Activity icon

Replied to Can't Install Sweet Alert 2 In Laravel 6.0 How?

Ahh I see. . . . Okay. I will try it. . . Thank you so much <3

Activity icon

Started a new conversation Can't Install Sweet Alert 2 In Laravel 6.0 How?

Your requirements could not be resolved to an installable set of packages.

Problem 1

- Installation request for realrashid/sweet-alert ^2.0 -> satisfiable by realrashid/sweet-alert[v2.0].
- Conclusion: remove laravel/framework v6.0.0
- Conclusion: don't install laravel/framework v6.0.0
- realrashid/sweet-alert v2.0 requires laravel/framework ~5.4.0|~5.8.0|~5.9.0 -> satisfiable by laravel/framework[5.4.x-dev, 5.8.x-dev].

- Can only install one of: laravel/framework[5.8.x-dev, v6.0.0].
- Can only install one of: laravel/framework[5.4.x-dev, v6.0.0].
- Installation request for laravel/framework (locked at v6.0.0, required as ^6.0) -> satisfiable by laravel/framework[v6.0.0].

Why I can't install sweet alert 2 in Laravel 6? How to implement it?