• #704

    Riccardo
    Participant

    804

    Campaign Form Countries

    Please can you inform me on what code to add to the startcampaign.php to order the countries in Alphabetical order? Currently they are all scrambled and not ordered BY ASC in anyway.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • #714

    Hi

    At the file /root/app/Http/Controllers/CampaignsController.php on line 36, find $countries = Country::all();

    Replace with $countries = Country::orderBy('name', 'desc')->get();

    Then your country will be come by name descending order.

    Best regards

    #719

    Riccardo
    Participant

    Thank you!

    #762

    ecoletiva
    Participant

    Hi

    If i try to get the countries order by name ascending, returns me a error!

    $countries = Country::orderBy('name', 'asc')->get();

    I can not change DESC by ASC only?

Viewing 3 replies - 1 through 3 (of 3 total)

Purchase for access

Buy a copy of GetFund – A Professional Laravel Crowdfunding Platform for access to our member center.

Buy