Posts

Showing posts from June, 2022

How to Add Social Media Share Buttons in Laravel?

  In this tutorial, i will show you laravel social media share buttons. I’m going to show you about social media share buttons laravel. We will look at example of how to add social media share buttons in laravel. Step 1: Install jorenvanhocht/laravel-share Package in first step, we need install jorenvanhocht/laravel-share composer package so let's use bellow command to install: composer require jorenvanhocht / laravel - share after installing successfully, we need to publish configuration file using bellow command: php artisan vendor : publish -- provider = "Jorenvh\Share\Providers\ShareServiceProvider" Above command will create laravel-share.php config file on config folder and share.js in public/js/ folder. Step 2: Create Route In this is step we need to create some routes for social share example view. routes/web.php <? php use Illuminate \Support\Facades\Route ; use App \Http\Controllers\SocialShareController ; /* |-----------------------------------------...

Laravel 8 Call to undefined function str_slug()

  Install   laravel/helpers   package 1 composer require laravel/helpers Use the below code in your own controller 1 2 use Illuminate\Support\Str; $posts ->slug = str_slug( $request ->input( 'title' ). ' ' . $posts ->id, '-' );