Journal Entry, November 15th to November 22nd 2019

November 22, 2019 · 1 min read

Laravel Nova

  1. Mon Nov 18

    • The following is necessary as name isn't a publicly accessible property facepalm.
    • Using name is allowed oddly enough but sorting isn't respected so my guess is Laravel can't find the property and tries to sort by the object instead.
    • It's extremely off-putting to see it partially sort and have no fucking clue why it didn't fully sort as expected. I spent longer than I should've and hated myself when I found the answer.

      return $categories->sortBy(function(\App\Classes\Uploads\Category $category) {
          return $category->getName();
      }, SORT_NATURAL);