Connect with us

Laravel 6.0 - 6.4 - how to fix str_slug and str_limit with any other helpers function

kizinho

Published

on

Follow
Laravel 6.0 - 6.4 - how to fix str_slug and str_limit with any other helpers function
Photo: Naijacrawl

Hi folks, since laravel 6. 0 removed many things like make Auth and Helpers functions. Before you can use them you need to install their packages.


You can use helper function like str_slug, which is used to create a slug and str_limit, which is used to set a limit of a string. Today will you how you can make use of it by just installing a package for helper function


composer require laravel/helpers

That's all you need and start using the helper functions like you are doing on laravel 5.


Thanks for reading



kizinho

I am a software developer, like meeting people and love blogging, that's why I developed naijacrawl because that's what I love doing.

Continue Reading
Click To Comment

BE First To Comment


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    PhpStorm 2019.1 Provides Blade Debugging Support and a Laravel Code Style Preset

    kizinho

    Published

    on

    PhpStorm 2019.1 Provides Blade Debugging Support and a Laravel Code Style Preset
    Photo: Naijacrawl

    JetBrains announced the release of PhpStorm 2019. 1.This week with debugging support for Blade (and Twig) templates and a new predefined Laravel code style configuration.

     

    Upgrade your Laravel applications to Laravel 5.8 and get XDebug ready to start debugging Laravel Blade templates in PhpStorm 2019.

     

    Thanks to a Laravel 5.8 contribution for including the Laravel 5.8 Blade Template File Path in compiled templates, now you can set a breakpoint directly in a blade file instead of having to search for the compiled template and setting a breakpoint: Another Laravel-related feature in PhpStorm 2019.1 is a predefined Laravel code style setting.

     

    You can configure it for your project from the preferences menu — Settings > Editor > Code Style > PHP and then select “set from > Predefined Style > Laravel”:

     

    If you want to get a quick overview of what’s new, check out this video from JetBrains: The official PhpStorm blog has a PhpStorm 2019.1 release announcement post with all the details of the release.

    Continue Reading

    Laravel 5.8.8 Released (bugs fixed and new features )

    kizinho

    Published

    on

    Laravel 5.8.8 Released (bugs fixed and new features )
    Photo: Naijacrawl

    The Laravel team released Laravel 5. 8.8 yesterday with a new query builder method along with the latest fixes and changes in the 5.8 branch.

     

    First, a new Builder::forPageBeforeId() method was added to compliment an existing forPageAfterId().

     

    These methods are useful to query for records before or after a given record. In the pull request author Tim MacDonald illustrates the following example to get the records around a “focused” post:

    $posts = new Collection;
    
    $posts = $posts->concat(ChatPost::forPageBeforeId(15, $focused->id)->get()->reverse());
    
    $posts = $posts->push($focused);
    
    $posts = $posts->concat(ChatPost::forPageAfterId(15, $focused->id)->get());

     

     

    You can see the full list of fixes below, and the whole difference  between 5.8.7 and 5.8.8 on GitHub.

     

    The full release notes for Laravel 5.8 are available in the GitHub 5.8 changelog:

     

    v5.8.8

    Added Added Illuminate\Database\Query\Builder::forPageBeforeId() method (#28011)


    Fixed

    BelongsToMany::detach() with custom pivot class (#27997)

    Fixed incorrect event namespace in generated listener by event:generate command (#28007)

     

    Fixed unique validation without ignored column (#27987)


    Changed

     

    Added parameters argument to resolve helper (#28020) Don’t add the path only if path is empty in compiled view (#27976)

     

    Refactoring

    Refactoring of env() helper (#27965)

    Continue Reading

    Latest



    Face of Naijacrawl


    ChukwubuikemSunday ChukwubuikemSunday

    Sunday Chukwubuikem


    Higher - 09061773292

    Trending