jenky

jenky

Member Since 2 Years Ago

Experience Points 5,770
Experience Level 2

4,230 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 24
Lessons
Completed
Best Reply Awards 5
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

18 Jun
15 hours ago

jenky left a reply on Call To A Member Function ToArray() On Null

@swimmer

  1. If your menu doesn’t exist then your function will return null otherwise it returns an array, hence the `return [ to keep the return type as array so you can iterate without checking the results of `getAll
  2. first() will return null or an Menu object instance, so if is good enough, no need for !empty
09 Jan
5 months ago

jenky left a reply on Laravel Log Doesn't Work.

Because the default logging use daily channel which creates new log file everyday instead of single laravel.log

https://github.com/laravel/laravel/blob/321d9e3786bfd605fe847e34687ccfa8def5bda2/config/logging.php#L39

18 Jun
1 year ago

jenky left a reply on Making This API Code Bring Through More Relevant Data?

How can it display 1 movie while you're using for to build the list. Genres are not included in your API results, so obviously it can't be displayed.

jenky left a reply on How To Update Approved From 0 To 1 In Laravel

Show your related routes. Looks like your route model binding didn't match your typehint (BTW your form action is using requisition id not submit application id). So $submit_application is a new instance of SubmitApplication which is exactly your dump result

07 Jun
1 year ago

jenky left a reply on Having Vue.js Application As A Frontend

If your frontend is SPA built with Vue.js, then 2 different codebases are fine. Otherwise keeps it as a single app.

31 May
1 year ago

jenky left a reply on Is This Documentation Is Wrong????

Route::get('/questions/{$id}', '[email protected]')->name('questions');

Route parameter doesn't contain $ sign, remove $ from your {$id}

29 May
1 year ago

jenky left a reply on How Can I Use Name Field To Login Instead Of Email Field In Laravel Auth ?

That's weird, theoretically override username method should work. intended will redirect to the previously intended location, the path you provide is the fallback location.

28 May
1 year ago

jenky left a reply on Why This Error Show Anf "Parse Error: Syntax Error, Unexpected 'box' (T_STRING), Expecting '('"

Remove box

Route::get('dashboard', function () { 
    return 123;
});
14 May
1 year ago

jenky left a reply on Laravel Passport - Only For Js?

Yep, of course, why not. Passport basically is oAuth2 server, similar to Facebook, Twitter, Google... oAuth

11 May
1 year ago

jenky left a reply on Search Method Which Queries By Nested Relationship Fields

@wizjo Add this to the boot method of your AppServiceProvider. Don't forget to import the nacespaces

Request::macro('hasAny', function ($keys) {
    $keys = is_array($keys) ? $keys : func_get_args();
    
    $input = $this->all();
    
    foreach ($keys as $key) {
        if (Arr::has($input, $key)) {
            return true;
        }
    }
    
    return false;
});
10 May
1 year ago

jenky left a reply on Checkbox Toggle Value Not Returning

What're you trying to do? Send request to backend when checkbox toggled? And why do you have to submit the form using jQuery, but only to prevent it??

09 May
1 year ago
08 May
1 year ago

jenky left a reply on Inverse Polymorphic One-to-many

Use Many To Many Polymorphic Relations: https://laravel.com/docs/5.6/eloquent-relationships#many-to-many-polymorphic-relations. In this case, your group is tags in the example

jenky left a reply on Login With Account Number, Username And Password

@Piotrg Yeah, you have to import the namespace, obviously

jenky left a reply on Can't Edit Or Delete Post In Laravel Project

if(auth()->user()->id !== $ads->user_id)

Since you're using !==, make sure your user_id is integer

jenky left a reply on [Laravel 5.4] How To Get The Current HTTP Status Code In 404 Error Page?

You could use the $exception variable inside your template

jenky left a reply on How To Create Auto Generated ID Suffix? E.g A-001, A-002, So On And So Forth

@bobbybouwmann

// Postest model

protected static function boot()
{
    parent::boot();

    static::saved(function ($postest) {
        $postest->update([
            'A-00' . $postest->id,
        ]);
    });
}

Does it make a loop cuz update also trigger saved event?

jenky left a reply on Login With Account Number, Username And Password

Seems like you've edited your code. Looks good tho

jenky left a reply on Login With Account Number, Username And Password

Which Laravel version???

07 May
1 year ago

jenky left a reply on How Do I Combine Three Foreach Loops Into One ?

Use groupBy method in the collection, you can group your rows by code then use only 1 foreach in blade

@foreach ($results->groupBy('code') as $code => $report)
    Code: {{ $code }} 
    From amount: {{ $report->where('type', '-')->min('amount') }}
    To amount: {{ $report->where('type', '+')->max('amount') }}
@endforeach 
04 May
1 year ago
28 Feb
1 year ago

jenky left a reply on Vue Component Not Displayed:Laravel5.4 And Vue.js2

Make sure your html contains a element with id="app"

05 Dec
1 year ago

jenky left a reply on Any Idea Why I Can't Get My Cors Working?

Make sure your request has Origin header. The Access-Control-Allow-Origin header should contain the value that was sent in the request's Origin header

26 Oct
1 year ago

jenky left a reply on Token Mismatch With Vue-dropzone

This works for me

:headers="{ 'X-CSRF-TOKEN': token }"

// .....
const token = document.head.querySelector('meta[name="csrf-token"]').content
21 Jun
1 year ago

jenky left a reply on Laravel Config(changes)

Current execution.

26 Apr
2 years ago

jenky left a reply on Storing Session Value To Database

@atishrajput hmm, seems like Laravel 4.2? @Kaustubh You can find the answer on the Laravel documentation page. Here is the link for 5.4 https://laravel.com/docs/5.4/session#driver-prerequisites

13 Apr
2 years ago

jenky left a reply on Undefined Variable: Countries (View: C:\xampp\htdocs\list\resources\views\vendor.blade.php)

@jhansi Is your page url is http://..../vendors/add? If it is then change your route to

Route::get('/vendors/add', '[email protected]');

jenky left a reply on Undefined Variable: Countries (View: C:\xampp\htdocs\list\resources\views\vendor.blade.php)

Your problem is here

Route::get('/vendors/add', function () {
    return view('vendor');
});

Your route was handled by the closure not the create method from your controller.

11 Apr
2 years ago

jenky left a reply on Find Or Fail - Strange Behaviour

@tisuchi yeah, i know the difference, but from his code.

$order = Order::findOrFail($order_id)

I think the $order_id is the value of the id field in the table.

jenky left a reply on Find Or Fail - Strange Behaviour

I don't see anything strange here. If the record couldn't be found in the database, the exception is raised with findOrFail, same for firstOrFail.

03 Apr
2 years ago

jenky left a reply on Order By Eager Loaded Colum

Teacher::with(['account' => function ($q) { $q->orderBy('surname'); }])