Example of Collection Methods: Pluck in akaunting/akaunting

File app/Http/ViewComposers/Modules.php (link to Github)
class Modules
{
    public function compose(View $view)
    {
        if (setting('apps.api_key')) {
            $categories = Cache::remember('modules.categories.' . language()->getShortCode(), Date::now()->addHour(6), function () {
                return collect($this->getCategoriesOfModules())->pluck('name', 'slug')
                    ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '*');
            });
        } else {
            $categories = collect([
                '*' => trans('general.all_type', ['type' => trans_choice('general.categories', 2)]),
            ]);
        }

        $view->with(['categories' => $categories]);
    }
}
File app/Http/Controllers/Common/Companies.php (link to Github)
use App\Models\Common\Company;
use App\Models\Setting\Currency;

class Companies extends Controller
{
    public function edit(Company $company)
    {
        if ($this->isNotUserCompany($company->id)) {
            return redirect()->route('companies.index');
        }

        $currencies = Currency::enabled()->pluck('name', 'code');

        return view('common.companies.edit', compact('company', 'currencies'));
    }
}