Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

kkhicher1

kkhicher1

PHP Developer at Home

Member Since 1 Year Ago

Experience Points
4,530
Total
Experience

470 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
1
Lessons
Completed
Best Reply Awards
3
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
4,530 XP
Nov
15
1 week ago
Activity icon

Replied to Huge Amount Of Record Fetching Faster From Database

@automica @ttjordan @tray2

i want to remove category, media, likes, sub_category from my api record. anyhow

{
        "id": 14,
        "name": "Beleive in yourself",
        "slug": "beleive-in-yourself",
        "body": "BELIEVE YOU CAN AND YOU'RE HALFWAY THERE",
        "total_downloads": 0,
        "category_id": 3,
        "sub_category_id": "4",
        "created_at": "2020-10-05T16:13:16.000000Z",
        "updated_at": "2020-10-05T16:13:16.000000Z",
        "url": "http://api.quotster.in/storage/34/BELIEVE-YOU-CAN-AND-YOU'RE-HALFWAY-THERE.png",
        "total_likes": 13,
        "current_user_liked": false,
        "sub_category_name": "Quotes",
        "watermark_image": "http://api.quotster.in/storage/34/conversions/BELIEVE-YOU-CAN-AND-YOU'RE-HALFWAY-THERE-download-watermark.jpg",
        "category_name": "Motivational Quotes",
        "thumb": "http://api.quotster.in/storage/34/conversions/BELIEVE-YOU-CAN-AND-YOU'RE-HALFWAY-THERE-thumb.jpg",
        "width": 400,
        "height": 400,
        "app_image": "http://api.quotster.in/storage/34/conversions/BELIEVE-YOU-CAN-AND-YOU'RE-HALFWAY-THERE-app.jpg",
        "media": [
            {
                "id": 34,
                "model_type": "App\Image",
                "model_id": 14,
                "uuid": "7731c88d-4d30-4da4-a61e-e0f43b33ec14",
                "collection_name": "images",
                "name": "BELIEVE YOU CAN AND YOU'RE HALFWAY THERE",
                "file_name": "BELIEVE-YOU-CAN-AND-YOU'RE-HALFWAY-THERE.png",
                "mime_type": "image/png",
                "disk": "public",
                "conversions_disk": "public",
                "size": 3619713,
                "manipulations": [],
                "custom_properties": {
                    "generated_conversions": {
                        "app": true,
                        "thumb": true,
                        "download-watermark": true
                    }
                },
                "responsive_images": [],
                "order_column": 22,
                "created_at": "2020-10-05T16:13:16.000000Z",
                "updated_at": "2020-10-30T04:19:29.000000Z"
            }
        ],
        "likes": [
            {
                "id": 25,
                "ip": "172.68.146.68",
                "image_id": 14,
                "created_at": "2020-10-10T16:51:48.000000Z",
                "updated_at": "2020-10-10T16:51:48.000000Z"
            },
            {
                "id": 35,
                "ip": "172.68.146.80",
                "image_id": 14,
                "created_at": "2020-10-11T04:02:49.000000Z",
                "updated_at": "2020-10-11T04:02:49.000000Z"
            },
            {
                "id": 81,
                "ip": "162.158.165.140",
                "image_id": 14,
                "created_at": "2020-10-11T10:13:51.000000Z",
                "updated_at": "2020-10-11T10:13:51.000000Z"
            },
            {
                "id": 82,
                "ip": "172.68.146.248",
                "image_id": 14,
                "created_at": "2020-10-11T10:13:53.000000Z",
                "updated_at": "2020-10-11T10:13:53.000000Z"
            },
            {
                "id": 83,
                "ip": "172.69.135.226",
                "image_id": 14,
                "created_at": "2020-10-11T10:13:54.000000Z",
                "updated_at": "2020-10-11T10:13:54.000000Z"
            },
            {
                "id": 84,
                "ip": "172.69.135.70",
                "image_id": 14,
                "created_at": "2020-10-11T10:13:56.000000Z",
                "updated_at": "2020-10-11T10:13:56.000000Z"
            },
            {
                "id": 86,
                "ip": "162.158.167.34",
                "image_id": 14,
                "created_at": "2020-10-11T10:13:59.000000Z",
                "updated_at": "2020-10-11T10:13:59.000000Z"
            },
            {
                "id": 87,
                "ip": "162.158.166.71",
                "image_id": 14,
                "created_at": "2020-10-11T10:14:00.000000Z",
                "updated_at": "2020-10-11T10:14:00.000000Z"
            },
            {
                "id": 135,
                "ip": "162.158.165.76",
                "image_id": 14,
                "created_at": "2020-10-11T14:58:05.000000Z",
                "updated_at": "2020-10-11T14:58:05.000000Z"
            },
            {
                "id": 200,
                "ip": "162.158.165.150",
                "image_id": 14,
                "created_at": "2020-10-31T14:24:26.000000Z",
                "updated_at": "2020-10-31T14:24:26.000000Z"
            },
            {
                "id": 214,
                "ip": "172.68.146.224",
                "image_id": 14,
                "created_at": "2020-11-03T02:16:39.000000Z",
                "updated_at": "2020-11-03T02:16:39.000000Z"
            },
            {
                "id": 262,
                "ip": "162.158.167.148",
                "image_id": 14,
                "created_at": "2020-11-15T02:45:34.000000Z",
                "updated_at": "2020-11-15T02:45:34.000000Z"
            },
            {
                "id": 263,
                "ip": "172.68.146.146",
                "image_id": 14,
                "created_at": "2020-11-16T02:50:21.000000Z",
                "updated_at": "2020-11-16T02:50:21.000000Z"
            }
        ],
        "sub_category": {
            "id": 4,
            "category_id": 3,
            "name": "Quotes",
            "slug": "quotes",
            "created_at": "2020-10-01T11:07:55.000000Z",
            "updated_at": "2020-10-05T15:28:13.000000Z",
            "category": {
                "id": 3,
                "name": "Motivational Quotes",
                "slug": "motivational-quotes",
                "created_at": "2020-10-01T10:09:27.000000Z",
                "updated_at": "2020-10-03T04:57:11.000000Z",
                "url": "http://api.quotster.in/storage/131/Motivational-Quotes",
                "media": [
                    {
                        "id": 131,
                        "model_type": "App\Category",
                        "model_id": 3,
                        "uuid": "5c3e42a5-717c-42e4-a496-576f2c0b81d0",
                        "collection_name": "categories",
                        "name": "Motivational Quotes",
                        "file_name": "Motivational-Quotes",
                        "mime_type": "image/jpeg",
                        "disk": "public",
                        "conversions_disk": "public",
                        "size": 86379,
                        "manipulations": [],
                        "custom_properties": [],
                        "responsive_images": [],
                        "order_column": 89,
                        "created_at": "2020-10-29T15:59:17.000000Z",
                        "updated_at": "2020-10-29T15:59:17.000000Z"
                    }
                ]
            }
        }
    }
Activity icon

Replied to Huge Amount Of Record Fetching Faster From Database

@automica digital ocean 10 dollar plan 2gb ram 1cpu ... currently no visitor

Nov
14
1 week ago
Activity icon

Replied to Huge Amount Of Record Fetching Faster From Database

@automica or @ttjordan

I got data in 2 or 3 seconds if i fetch only 10 records

Activity icon

Replied to Huge Amount Of Record Fetching Faster From Database

@automica @ttjordan

App link = https://play.google.com/store/apps/details?id=com.quotster.quotster

Im using all records here so i cant paginate data. I need all record as much as possible.

Activity icon

Replied to Huge Amount Of Record Fetching Faster From Database

@automica

Remote Server - 1 Min Approx

Try = api[dot].quotster[dot]in/api/test

controller

public function randomImages()
    {
        return Cache::remember('images', 60, function(){
            return new ApiCollection(Image::all());
        });
    }

model

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use League\Flysystem\FileNotFoundException;
use Spatie\Image\Exceptions\InvalidManipulation;
use Spatie\Image\Manipulations;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media;

class Image extends Model implements HasMedia
{
    use InteractsWithMedia;
    protected $fillable = [
        'name',
        'body',
        'slug',
        'category_id',
        'sub_category_id'
    ];

    protected $appends = [
        'url',
        'total_likes',
        'current_user_liked',
        'sub_category_name',
        'watermark_image',
        'category_name',
        'thumb',
        'width',
        'height',
        'app_image'
    ];

    protected $casts = [
        'total_likes'           => 'int',
        'current_user_liked'    => 'boolean',
        'sub_category_name'     => 'string'
    ];

    public function setNameAttribute($value)
    {
        $this->attributes['name'] = $value;
        $this->attributes['slug'] = $this->uniqueSlug($value);
    }
    
    public function uniqueSlug($value) {
        $slug = str_slug($value);
        if (static::where('slug', $slug)->exists()) {
            $slug = $this->incrementSlug($slug);
        }
    
        return $slug;
    }

    public function incrementSlug($slug) {
    
        $original = $slug;
    
        $count = 2;
    
        while (static::where('slug', $slug)->exists()) {
    
            $slug = "{$original}-" . $count++;
        }
    
        return $slug;
    
    }

    public function clearMediaCollection(string $collectionName = 'default'): HasMedia
    {
        // TODO: Implement clearMediaCollection() method.
    }

    public function registerMediaConversions(Media $media = null): void
    {
        $this->addMediaCollection('images');

//        $this->addMediaConversion('4k')->width(3840)->height(2160);
//        $this->addMediaConversion('2k')->width(2048)->height(1440);
//        $this->addMediaConversion('full-hd')->width(1920)->height(1080);
//        $this->addMediaConversion('hd')->width(1280)->height(720);
//        $this->addMediaConversion('facebook')->width(1200)->height(628);
//        $this->addMediaConversion('instagram-square')->width(1080)->height(1080);
//        $this->addMediaConversion('instagram-portrait')->width(1080)->height(1350);
//        $this->addMediaConversion('instagram-landscape')->width(1080)->height(608);
        $this->addMediaConversion('thumb')->height(400);
        $this->addMediaConversion('app')->height(720)->nonOptimized();

            $this->addMediaConversion('download-watermark')
                ->watermark(public_path('/asset/site/watermark.png'))
                ->watermarkWidth(150)
                ->watermarkPosition(Manipulations::POSITION_BOTTOM_RIGHT);

    }

    public function getUrlAttribute()
    {
        $media = $this->getMedia('images')->first();
        return $media != null ? $media->getUrl() :"";
    }

    public function getThumbAttribute()
    {
        $media = $this->getMedia('images')->first();
        return $media != null ? $media->getUrl('thumb') : "";
    }
    public function getAppImageAttribute()
    {
        $media = $this->getMedia('images')->first();
        return $media != null ? $media->getUrl('app') : "";
    }

    public function getWidthAttribute()
    {
        if($this->thumb){
            list($width) = getimagesize($this->thumb);
            return $width;
        }
    }

    public function getHeightAttribute()
    {
        if($this->thumb){
            list($height) = getimagesize($this->thumb);
            return $height;
        }
    }

    public function getConversionsAttribute()
    {
        $media_urls = [];
        $media = $this->getMedia('images');

        foreach ($media[0][ "custom_properties"]["generated_conversions"] as $conversion => $hasConversion){
            if($hasConversion === true && $conversion !== 'download-watermark'){
                $conversionName = ucwords(str_replace('-', ' ', $conversion));
                $array = [
                    'display_name'      =>  $conversionName,
                    'conversion_name'   =>  $conversion,
                    'url'               =>  $media[0]->getUrl($conversion)
                ];
                array_push($media_urls, $array);
            }
        }

        return $media_urls;
    }

    public function getTotalLikesAttribute(){
        return $this->likes()->count();
    }

    public function getCurrentUserLikedAttribute()
    {
        return !!array_filter( $this->likes->toArray(), function($like){
            return $like['ip'] == $_SERVER['REMOTE_ADDR'];
        });
    }

    public function getSubCategoryNameAttribute()
    {
        return $this->subCategory->name ?? "";
    }

    public function getCategoryNameAttribute()
    {
        return $this->subCategory->category->name ?? "";
    }

    public function getWatermarkImageAttribute()
    {
        $media = $this->getMedia('images')->first();
        return $media != null ? $media->getUrl('download-watermark') : "";
    }

    //relationship
    public function likes(){
        return $this->hasMany(Like::class);
    }

    public function tags()
    {
        return $this->belongsToMany(Tag::class)->withTimestamps();
    }

    public function category()
    {
        return $this->belongsTo(Category::class);
    }

    public function subCategory()
    {
        return $this->belongsTo(SubCategory::class);
    }


}
Activity icon

Started a new Conversation Huge Amount Of Record Fetching Faster From Database

I have more than 1000 record and i fetching all record from database in one time with media, category, subcategory and tags relationship.

Its take more than 1 min to fetch all record i want this should be less than 2 or 3 seconds. I used redis but its also slow.

Nov
10
2 weeks ago
Activity icon

Replied to Ffmpeg Failed To Execute Command C:\ffmpeg\bin\ffmpeg.exe

@rodrigo.pedra

After Upload On Server I got another issue. I already installed ffmpeg on centos Server

Log

[2020-11-10 10:44:24] local.ERROR: Unable to load FFMpeg {"exception":"[object] (FFMpeg\Exception\ExecutableNotFoundException(code: 0): Unable to load FFMpeg at /home/servername/career/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFMpegDriver.php:55)
[stacktrace]
#0 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(61): FFMpeg\Driver\FFMpegDriver::create(Object(Illuminate\Log\LogManager), Object(Alchemy\BinaryDriver\Configuration))
#1 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#2 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#3 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('FFMpeg\\Driver\\F...', Array, true)
#4 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('FFMpeg\\Driver\\F...', Array)
#5 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('FFMpeg\\Driver\\F...', Array)
#6 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(67): Illuminate\Foundation\Application->make('FFMpeg\\Driver\\F...')
#7 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#8 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#9 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('FFMpeg\\FFMpeg', Array, true)
#10 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('FFMpeg\\FFMpeg', Array)
#11 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('FFMpeg\\FFMpeg', Array)
#12 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(73): Illuminate\Foundation\Application->make('FFMpeg\\FFMpeg')
#13 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#14 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#15 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('ProtoneMedia\\La...', Array, true)
#16 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('ProtoneMedia\\La...', Array)
#17 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('ProtoneMedia\\La...', Array)
#18 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(80): Illuminate\Foundation\Application->make('ProtoneMedia\\La...')
#19 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#20 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#21 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('laravel-ffmpeg', Array, true)
#22 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('laravel-ffmpeg', Array)
#23 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('laravel-ffmpeg', Array)
#24 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(1284): Illuminate\Foundation\Application->make('laravel-ffmpeg')
#25 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(198): Illuminate\Container\Container->offsetGet('laravel-ffmpeg')
#26 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(166): Illuminate\Support\Facades\Facade::resolveFacadeInstance('laravel-ffmpeg')
#27 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(255): Illuminate\Support\Facades\Facade::getFacadeRoot()
#28 /home/servername/career/app/Jobs/ConvertVideoForStreaming.php(48): Illuminate\Support\Facades\Facade::__callStatic('fromDisk', Array)
#29 [internal function]: App\Jobs\ConvertVideoForStreaming->handle()
#30 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#31 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#32 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#33 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#34 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#35 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#36 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#37 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#38 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#39 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\ConvertVideoForStreaming), false)
#40 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#41 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#42 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#43 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(App\Jobs\ConvertVideoForStreaming))
#44 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)
#45 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#46 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(182): Illuminate\Queue\SyncQueue->push(Object(App\Jobs\ConvertVideoForStreaming))
#47 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(158): Illuminate\Bus\Dispatcher->pushCommandToQueue(Object(Illuminate\Queue\SyncQueue), Object(App\Jobs\ConvertVideoForStreaming))
#48 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(73): Illuminate\Bus\Dispatcher->dispatchToQueue(Object(App\Jobs\ConvertVideoForStreaming))
#49 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php(17): Illuminate\Bus\Dispatcher->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#50 /home/servername/career/app/Http/Controllers/WrittenQuestionVideoAnswerController.php(37): App\Http\Controllers\Controller->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#51 [internal function]: App\Http\Controllers\WrittenQuestionVideoAnswerController->store(Object(Illuminate\Http\Request))
#52 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#53 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)
#54 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Route.php(239): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\WrittenQuestionVideoAnswerController), 'store')
#55 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Route.php(196): Illuminate\Routing\Route->runController()
#56 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(685): Illuminate\Routing\Route->run()
#57 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#58 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#59 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#61 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), 60, '1')
#62 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(687): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#64 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#65 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(628): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#66 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(617): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#67 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#68 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#69 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#70 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#71 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#72 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#74 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#76 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#77 /home/servername/career/vendor/fruitcake/laravel-cors/src/HandleCors.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#78 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#79 /home/servername/career/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#80 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#81 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#82 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#83 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#84 /home/servername/career/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#85 {main}

[previous exception] [object] (Alchemy\BinaryDriver\Exception\ExecutableNotFoundException(code: 0): Executable not found, proposed : /home/servername/career/app/ffmpeg\bin\ffmpeg.exe at /home/servername/career/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php:159)
[stacktrace]
#0 /home/servername/career/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFMpegDriver.php(53): Alchemy\BinaryDriver\AbstractBinary::load(Array, Object(Illuminate\Log\LogManager), Object(Alchemy\BinaryDriver\Configuration))
#1 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(61): FFMpeg\Driver\FFMpegDriver::create(Object(Illuminate\Log\LogManager), Object(Alchemy\BinaryDriver\Configuration))
#2 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#3 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#4 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('FFMpeg\\Driver\\F...', Array, true)
#5 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('FFMpeg\\Driver\\F...', Array)
#6 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('FFMpeg\\Driver\\F...', Array)
#7 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(67): Illuminate\Foundation\Application->make('FFMpeg\\Driver\\F...')
#8 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#9 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#10 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('FFMpeg\\FFMpeg', Array, true)
#11 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('FFMpeg\\FFMpeg', Array)
#12 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('FFMpeg\\FFMpeg', Array)
#13 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(73): Illuminate\Foundation\Application->make('FFMpeg\\FFMpeg')
#14 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#15 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#16 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('ProtoneMedia\\La...', Array, true)
#17 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('ProtoneMedia\\La...', Array)
#18 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('ProtoneMedia\\La...', Array)
#19 /home/servername/career/vendor/pbmedia/laravel-ffmpeg/src/Support/ServiceProvider.php(80): Illuminate\Foundation\Application->make('ProtoneMedia\\La...')
#20 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider->ProtoneMedia\LaravelFFMpeg\Support\{closure}(Object(Illuminate\Foundation\Application), Array)
#21 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build(Object(Closure))
#22 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('laravel-ffmpeg', Array, true)
#23 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\Foundation\Application->resolve('laravel-ffmpeg', Array)
#24 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('laravel-ffmpeg', Array)
#25 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(1284): Illuminate\Foundation\Application->make('laravel-ffmpeg')
#26 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(198): Illuminate\Container\Container->offsetGet('laravel-ffmpeg')
#27 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(166): Illuminate\Support\Facades\Facade::resolveFacadeInstance('laravel-ffmpeg')
#28 /home/servername/career/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(255): Illuminate\Support\Facades\Facade::getFacadeRoot()
#29 /home/servername/career/app/Jobs/ConvertVideoForStreaming.php(48): Illuminate\Support\Facades\Facade::__callStatic('fromDisk', Array)
#30 [internal function]: App\Jobs\ConvertVideoForStreaming->handle()
#31 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#32 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#33 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#34 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#35 /home/servername/career/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#36 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#37 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#38 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#39 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#40 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\ConvertVideoForStreaming), false)
#41 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#42 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#43 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#44 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(App\Jobs\ConvertVideoForStreaming))
#45 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)
#46 /home/servername/career/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#47 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(182): Illuminate\Queue\SyncQueue->push(Object(App\Jobs\ConvertVideoForStreaming))
#48 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(158): Illuminate\Bus\Dispatcher->pushCommandToQueue(Object(Illuminate\Queue\SyncQueue), Object(App\Jobs\ConvertVideoForStreaming))
#49 /home/servername/career/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(73): Illuminate\Bus\Dispatcher->dispatchToQueue(Object(App\Jobs\ConvertVideoForStreaming))
#50 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php(17): Illuminate\Bus\Dispatcher->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#51 /home/servername/career/app/Http/Controllers/WrittenQuestionVideoAnswerController.php(37): App\Http\Controllers\Controller->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#52 [internal function]: App\Http\Controllers\WrittenQuestionVideoAnswerController->store(Object(Illuminate\Http\Request))
#53 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#54 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)
#55 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Route.php(239): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\WrittenQuestionVideoAnswerController), 'store')
#56 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Route.php(196): Illuminate\Routing\Route->runController()
#57 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(685): Illuminate\Routing\Route->run()
#58 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#59 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#60 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#62 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), 60, '1')
#63 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#64 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(687): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#65 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#66 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(628): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#67 /home/servername/career/vendor/laravel/framework/src/Illuminate/Routing/Router.php(617): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#68 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#69 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#70 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#71 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#72 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#73 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#74 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#75 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#76 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#77 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#78 /home/servername/career/vendor/fruitcake/laravel-cors/src/HandleCors.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#79 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#80 /home/servername/career/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#81 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#82 /home/servername/career/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#83 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#84 /home/servername/career/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#85 /home/servername/career/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#86 {main}
"} 

Config File

<?php

return [
    'ffmpeg' => [
        'binaries' => env('FFMPEG_BINARIES', 'ffmpeg'),
        'threads'  => 12,
    ],

    'ffprobe' => [
        'binaries' => env('FFPROBE_BINARIES', 'ffprobe'),
    ],

    'timeout' => 3600,

    'enable_logging' => true,

    'set_command_and_error_output_on_exception' => true,
];

Nov
09
2 weeks ago
Activity icon

Replied to Ffmpeg Failed To Execute Command C:\ffmpeg\bin\ffmpeg.exe

You are right bro. I need different name of file while save so that different from input file. Because while processing its same name cause a error. Thanks for response

Activity icon

Replied to Vue Js Form Data Returns Undefined

{'mobile':'123'} - mobile is valid identifier so its not needed quotation marks

Activity icon

Replied to Hoe To Store Image From Webcam Into Database?

Try this package - https://www.npmjs.com/package/image-capture

You will need ssl certificate to work with mediaDevices.

Hope It Will help you.

Activity icon

Replied to UpdateOrCreate In Laravel 7

Setting::updateOrCreate(
            [
               'unique_column'	=> 'value'
            ],

            [
                'title' => $request->title,
                'phone' => $request->phone,
                'email' => $request->email,
                'description' => $request->description,
                'telegram' => $request->telegram,
                'instagram' => $request->instagram,
                'twitter' => $request->twitter,
                'facebock' => $request->facebock,
                'youtube' => $request->youtube,
                'linkedin' => $request->linkedin,
                'logo' => $logoPath ?? $request->logo,
                'symbol' =>  $symbolPath ?? $request->symbol,
            ],

in first array you pass that column which have unique value that already exist in database if that exist updateOrCreate method will update other wise that we create a new record

Activity icon

Started a new Conversation Ffmpeg Failed To Execute Command C:\ffmpeg\bin\ffmpeg.exe

I'm using laravel ffmpeg as per ffprobe command run successfully so i think there are no error to access file. please reply this

[2020-11-09 10:56:21] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe -help -loglevel quiet  
[2020-11-09 10:56:21] local.INFO: ffprobe executed command successfully  
[2020-11-09 10:56:21] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4" -show_streams -print_format json  
[2020-11-09 10:56:21] local.INFO: ffprobe executed command successfully  
[2020-11-09 10:56:21] local.INFO: ffmpeg running command C:\ffmpeg\bin\ffmpeg.exe -y -i "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=960:540 [out]" -pass 1 -passlogfile "C:\Users\Monika\AppData\Local\Temp\ffmpeg-passes5fa92055ae03b92r8w/pass-5fa92055ae298" "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4"  
[2020-11-09 10:56:21] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4" -show_format -print_format json  
[2020-11-09 10:56:22] local.INFO: ffprobe executed command successfully  
[2020-11-09 10:56:22] local.ERROR: ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -i "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=960:540 [out]" -pass 1 -passlogfile "C:\Users\Monika\AppData\Local\Temp\ffmpeg-passes5fa92055ae03b92r8w/pass-5fa92055ae298" "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4": ffmpeg version 4.3.1-2020-11-08-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2020-09-20T02:22:36.000000Z
  Duration: 00:00:41.22, start: 0.000000, bitrate: 3021 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2763 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Audio Handler
Output C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4 same as Input #0 - exiting
FFmpeg cannot edit existing files in-place.
  
[2020-11-09 10:56:22] local.ERROR: ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -i "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=960:540 [out]" -pass 1 -passlogfile "C:\Users\Monika\AppData\Local\Temp\ffmpeg-passes5fa92055ae03b92r8w/pass-5fa92055ae298" "C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4":

Error Output:

 ffmpeg version 4.3.1-2020-11-08-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2020-09-20T02:22:36.000000Z
  Duration: 00:00:41.22, start: 0.000000, bitrate: 3021 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2763 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Audio Handler
Output C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4 same as Input #0 - exiting
FFmpeg cannot edit existing files in-place.
 {"exception":"[object] (ProtoneMedia\LaravelFFMpeg\Exporters\EncodingException(code: 0): ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -i \"C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4\" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf \"[in]scale=960:540 [out]\" -pass 1 -passlogfile \"C:\Users\Monika\AppData\Local\Temp\ffmpeg-passes5fa92055ae03b92r8w/pass-5fa92055ae298\" \"C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4\":

Error Output:

 ffmpeg version 4.3.1-2020-11-08-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2020-09-20T02:22:36.000000Z
  Duration: 00:00:41.22, start: 0.000000, bitrate: 3021 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2763 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Audio Handler
Output C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4 same as Input #0 - exiting
FFmpeg cannot edit existing files in-place.
 at C:\laragon\www\video-streamer\vendor\pbmedia\laravel-ffmpeg\src\Exporters\EncodingException.php:12)
[stacktrace]
#0 C:\laragon\www\video-streamer\vendor\pbmedia\laravel-ffmpeg\src\Exporters\MediaExporter.php(149): ProtoneMedia\LaravelFFMpeg\Exporters\EncodingException::decorate(Object(FFMpeg\Exception\RuntimeException))
#1 C:\laragon\www\video-streamer\app\Jobs\ConvertVideoForStreaming.php(64): ProtoneMedia\LaravelFFMpeg\Exporters\MediaExporter->save('Mykc4IyJ6cXenLS...')
#2 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Jobs\ConvertVideoForStreaming->handle()
#3 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#8 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#9 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#10 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#11 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(85): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\ConvertVideoForStreaming), false)
#12 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#13 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#14 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(87): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(60): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(App\Jobs\ConvertVideoForStreaming))
#16 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\Jobs\Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)
#17 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#18 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(251): Illuminate\Queue\SyncQueue->push(Object(App\Jobs\ConvertVideoForStreaming))
#19 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(227): Illuminate\Bus\Dispatcher->pushCommandToQueue(Object(Illuminate\Queue\SyncQueue), Object(App\Jobs\ConvertVideoForStreaming))
#20 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(77): Illuminate\Bus\Dispatcher->dispatchToQueue(Object(App\Jobs\ConvertVideoForStreaming))
#21 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Bus\PendingDispatch.php(148): Illuminate\Bus\Dispatcher->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#22 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Bus\Dispatchable.php(17): Illuminate\Foundation\Bus\PendingDispatch->__destruct()
#23 C:\laragon\www\video-streamer\app\Http\Controllers\VideoController.php(40): App\Jobs\ConvertVideoForStreaming::dispatch(Object(App\Models\Video))
#24 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): App\Http\Controllers\VideoController->store(Object(App\Http\Requests\StoreVideoRequest))
#25 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)
#26 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Route.php(255): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\VideoController), 'store')
#27 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Route.php(197): Illuminate\Routing\Route->runController()
#28 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(691): Illuminate\Routing\Route->run()
#29 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#30 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(77): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#36 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(63): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#38 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(693): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#45 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(668): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#46 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(634): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#47 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(623): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#48 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(166): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#49 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#50 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#54 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#55 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#56 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php(87): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#57 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 C:\laragon\www\video-streamer\vendor\fruitcake\laravel-cors\src\HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#59 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 C:\laragon\www\video-streamer\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#61 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#62 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(141): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#64 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#65 C:\laragon\www\video-streamer\public\index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#66 {main}

[previous exception] [object] (Alchemy\BinaryDriver\Exception\ExecutionFailureException(code: 0): ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -i \"C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4\" -threads 12 -vcodec libx264 -acodec libmp3lame -b:v 500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf \"[in]scale=960:540 [out]\" -pass 1 -passlogfile \"C:\Users\Monika\AppData\Local\Temp\ffmpeg-passes5fa92055ae03b92r8w/pass-5fa92055ae298\" \"C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4\":

Error Output:

 ffmpeg version 4.3.1-2020-11-08-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2020-09-20T02:22:36.000000Z
  Duration: 00:00:41.22, start: 0.000000, bitrate: 3021 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2763 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2020-09-20T02:22:36.000000Z
      handler_name    : L-SMASH Audio Handler
Output C:\laragon\www\video-streamer\storage\app/public\Mykc4IyJ6cXenLSx.mp4 same as Input #0 - exiting
FFmpeg cannot edit existing files in-place.
 at C:\laragon\www\video-streamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php:95)
[stacktrace]
#0 C:\laragon\www\video-streamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php(73): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure('C:\\ffmpeg\\bin\\f...', 'ffmpeg version ...')
#1 C:\laragon\www\video-streamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php(207): Alchemy\BinaryDriver\ProcessRunner->run(Object(Symfony\Component\Process\Process), Object(SplObjectStorage), false)
#2 C:\laragon\www\video-streamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php(136): Alchemy\BinaryDriver\AbstractBinary->run(Object(Symfony\Component\Process\Process), false, Array)
#3 C:\laragon\www\video-streamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php(96): Alchemy\BinaryDriver\AbstractBinary->command(Array, false, Array)
#4 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Support\Traits\ForwardsCalls.php(23): FFMpeg\Media\AbstractVideo->save(Object(FFMpeg\Format\Video\X264), 'C:\\laragon\\www\\...')
#5 C:\laragon\www\video-streamer\vendor\pbmedia\laravel-ffmpeg\src\Drivers\PHPFFMpeg.php(175): ProtoneMedia\LaravelFFMpeg\Drivers\PHPFFMpeg->forwardCallTo(Object(ProtoneMedia\LaravelFFMpeg\FFMpeg\VideoMedia), 'save', Array)
#6 C:\laragon\www\video-streamer\vendor\pbmedia\laravel-ffmpeg\src\Exporters\MediaExporter.php(146): ProtoneMedia\LaravelFFMpeg\Drivers\PHPFFMpeg->__call('save', Array)
#7 C:\laragon\www\video-streamer\app\Jobs\ConvertVideoForStreaming.php(64): ProtoneMedia\LaravelFFMpeg\Exporters\MediaExporter->save('Mykc4IyJ6cXenLS...')
#8 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Jobs\ConvertVideoForStreaming->handle()
#9 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#10 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#11 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#12 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Container\Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#13 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#14 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#15 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#16 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(85): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\ConvertVideoForStreaming), false)
#18 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#19 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ConvertVideoForStreaming))
#20 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(87): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(60): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(App\Jobs\ConvertVideoForStreaming))
#22 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\Jobs\Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)
#23 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Queue\SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#24 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(251): Illuminate\Queue\SyncQueue->push(Object(App\Jobs\ConvertVideoForStreaming))
#25 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(227): Illuminate\Bus\Dispatcher->pushCommandToQueue(Object(Illuminate\Queue\SyncQueue), Object(App\Jobs\ConvertVideoForStreaming))
#26 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(77): Illuminate\Bus\Dispatcher->dispatchToQueue(Object(App\Jobs\ConvertVideoForStreaming))
#27 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Bus\PendingDispatch.php(148): Illuminate\Bus\Dispatcher->dispatch(Object(App\Jobs\ConvertVideoForStreaming))
#28 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Bus\Dispatchable.php(17): Illuminate\Foundation\Bus\PendingDispatch->__destruct()
#29 C:\laragon\www\video-streamer\app\Http\Controllers\VideoController.php(40): App\Jobs\ConvertVideoForStreaming::dispatch(Object(App\Models\Video))
#30 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): App\Http\Controllers\VideoController->store(Object(App\Http\Requests\StoreVideoRequest))
#31 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)
#32 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Route.php(255): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\VideoController), 'store')
#33 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Route.php(197): Illuminate\Routing\Route->runController()
#34 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(691): Illuminate\Routing\Route->run()
#35 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#36 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(77): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(63): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#44 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(693): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#51 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(668): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#52 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(634): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#53 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Routing\Router.php(623): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#54 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(166): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#55 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#56 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#57 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#59 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#61 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#62 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php(87): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 C:\laragon\www\video-streamer\vendor\fruitcake\laravel-cors\src\HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 C:\laragon\www\video-streamer\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#67 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#69 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(141): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#70 C:\laragon\www\video-streamer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#71 C:\laragon\www\video-streamer\public\index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#72 {main}
"} 
Oct
27
4 weeks ago
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: HEAD.

try

php artisan optimize:clear
php artisan cache:clear 
php artisan route:clear

and then

php artisan serve

then open localhost:8000 instead of localhost/testapp/public

Activity icon

Replied to Target [Repository] Is Not Instantiable While Building [Controller].

Thanks But i got answer Bro. the reason behind this also my protected constructor.... :D

Activity icon

Started a new Conversation Target [Repository] Is Not Instantiable While Building [Controller].

Hi,

i getting issue with one of my Repository but other working fine. Please check code

RepositoryServiceProvider.php

<?php

namespace App\Providers;

use App\Repositories\Eloquent\BaseRepository;
use App\Repositories\Eloquent\JobApplicationRepository;
use App\Repositories\Eloquent\QuestionRepository;
use App\Repositories\Eloquent\TestResultRepository;
use App\Repositories\EloquentRepositoryInterface;
use App\Repositories\JobApplicationRepositoryInterface;
use App\Repositories\QuestionRepositoryInterface;
use App\Repositories\TestResultRepositoryInterface;
use Illuminate\Support\ServiceProvider;

class RepositoryServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
       $this->app->bind(
           TestResultRepositoryInterface::class,
           TestResultRepository::class
       );
        $this->app->bind(
            EloquentRepositoryInterface::class,
            BaseRepository::class
        );
        $this->app->bind(
            JobApplicationRepositoryInterface::class,
            JobApplicationRepository::class
        );
        $this->app->bind(
            QuestionRepositoryInterface::class,
            QuestionRepository::class
        );

    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }
}

TestResultRepository.php

<?php


namespace App\Repositories\Eloquent;



use App\Repositories\TestResultRepositoryInterface;
use App\TestResult;
use Illuminate\Http\Request;

class TestResultRepository implements TestResultRepositoryInterface
{
    /**
     * @var TestResult
     */
    protected $testResult;

    /**
     * TestResultRepository constructor.
     * @param TestResult $testResult
     */
    protected function __construct(TestResult $testResult)
    {
        $this->testResult = $testResult;
    }

    public function saveTest(Request $request)
    {
        return $request;
    }
}

TestResultRepositoryInterface.php

<?php


namespace App\Repositories;


interface TestResultRepositoryInterface
{

}

TestResultController.php

<?php

namespace App\Http\Controllers;

use App\Repositories\TestResultRepositoryInterface;
use Illuminate\Http\Request;

class TestResultController extends Controller
{
    /**
     * @var TestResultRepositoryInterface
     */
    protected $testResultRepository;

    public function __construct(TestResultRepositoryInterface $testResultRepository)
    {
        $this->testResultRepository = $testResultRepository;
    }
    public function saveTest(Request $request)
    {
        dd($request);
        return $this->testResultRepository->saveTest($request);
    }
}

Oct
15
1 month ago
Activity icon

Started a new Conversation Laravel Application Deploy In Sub Directory

i want to deploy my laravel app to my current live domain.

example

root domain - example[dot]com

on this domain i created (shared hosting) sub folder named career

i deploy my laravel project to career folder

and i want to access like - exmple[dot]com/career

Oct
14
1 month ago
Activity icon

Replied to Codeigniter Session With Laravel?

@zeke8402 Same situation after 5 year bro. I want to redirect a CI auth user to laravel project with same database

Oct
13
1 month ago
Activity icon

Started a new Conversation CodeIgniter Auth User Transfer To Laravel Application

I have a requirement and i am not working on CodeIgniter application. i have a situation the current entry of auth user is in CodeIgniter application and via click i want to transfer same auth user on my laravel application. database may be same or different as per suggestion......

Oct
08
1 month ago
Activity icon

Replied to Pagination + InRandomOrder Duplicate Record Fetch

but it can be randomize after cache expire

Activity icon

Started a new Conversation Pagination + InRandomOrder Duplicate Record Fetch

$page = \request()->input('page', 1);
        $images = Cache::remember('images-'.$page, 60*60, function (){
            return Image::inRandomOrder()->paginate(10);
        });

        return json_encode($images);

next page duplicated record fetch and cache in not problem. i tried before implementing cache system

Oct
02
1 month ago
Activity icon

Replied to How To Get Data From Relationship Table

send your migration file

Oct
01
1 month ago
Activity icon

Replied to How To Hide Button If Status Is 1 And Hide If Status 0?

what is actually situation? everything is mixed up.

Sep
30
1 month ago
Activity icon

Replied to New Update Image Not Sent In Request In Vue Js

ya its right but you dont need to add _method and axios.put both to PUT http verb. You use only _method when using larave with laravel and use axios.post

Sep
29
1 month ago
Activity icon

Started a new Conversation Spatie Media Library Image Conversion Based On Image Size

Hi,

I want to image conversion based on Image size.

Look at Code.

Model

public function registerMediaConversions(Media $media = null): void
    {
        $this->addMediaCollection('images');

        $this->addMediaConversion('4k')->width(3840)->height(2160);
        $this->addMediaConversion('2k')->width(2048)->height(1440);
        $this->addMediaConversion('full-hd')->width(1920)->height(1080);
        $this->addMediaConversion('hd')->width(1280)->height(720);
        $this->addMediaConversion('facebook')->width(1200)->height(628);
        $this->addMediaConversion('instagram-square')->width(1080)->height(1080);
        $this->addMediaConversion('instagram-portrait')->width(1080)->height(1350);
        $this->addMediaConversion('instagram-landscape')->width(1080)->height(608);
        $this->addMediaConversion('thumb')->height(400);

            $this->addMediaConversion('download-watermark')
                ->watermark(public_path('/asset/site/watermark.png'))
                ->watermarkWidth(150)
                ->watermarkPosition(Manipulations::POSITION_BOTTOM_RIGHT);

    }

Controller Store method

public function store(Request $request)
    {
        $image = Image::create($request->all());
        $image->addMedia($request->file)->toMediaCollection('images');
        return ResponseBuilder::success();
    }

i want convert all sizes when 4k image size available and if image size is hd then skip all bigger Resolution conversions

Activity icon

Replied to Nuxt JS Auth Middleware Not Working Properly In Ssr Mode?

export default function (ctx) {
  if (ctx.app.$auth.$state.loggedIn) {
    return ctx.app.$auth.redirect('home')
  }
}

Activity icon

Replied to New Update Image Not Sent In Request In Vue Js

If you are using Laravel...

and send a post request instead of this.form.put

Activity icon

Replied to New Update Image Not Sent In Request In Vue Js

You need to send _method with update.

formData.append('_method', 'PUT');
Sep
17
2 months ago
Activity icon

Replied to Multi Role Social Login Or Register Laravel

ok the problem is segment. i can't get two different callback url from the provider(social).

if i create two service with diffrent redirect url (from social provider) than how to handle .env redirect??

only can pass single redirect url

'facebook' => [
        'client_id' => env('FACEBOOK_CLIENT_ID', ''),
        'client_secret' => env('FACEBOOK_CLIENT_SECRET', ''),
        'redirect' =>  env('FACEBOOK_REDIRECT', ''),
    ],

    'google' => [
        'client_id' => env('GOOGLE_CLIENT_ID', ''),
        'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
        'redirect' =>  env('GOOGLE_REDIRECT', ''),
    ],
    'twitter' => [
        'client_id' => env('TWITTER_CLIENT_ID', ''),
        'client_secret' => env('TWITTER_CLIENT_SECRET', ''),
        'redirect' =>  env('TWITTER_REDIRECT', ''),
    ],

.env file only get one redirect url

FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_REDIRECT='url'


GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT='url'

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_REDIRECT='url'
Activity icon

Replied to Queued Jobs Not Working In Laravel 8.x

then you need to provide whole code with error message... make sure you send code with three back-tick in the starting of code and end of the code

Activity icon

Replied to Laravel Form Submit Sending Form Action As Request Paramter

Send full code of Form and controller

Activity icon

Replied to Validation Doesn`t Work

TRY

dd($request->all());

and check you get same data index that you provided into the validate() method

Activity icon

Replied to Blade View For Rich Text Field On Description Tag

@lara-dom @bobbybouwmann told you same solution with more details

Activity icon

Replied to Queued Jobs Not Working In Laravel 8.x

in Laravel 8.x there are some changes with Queue so you check upgrade guide that can solve your problem.

Check This - https://laravel.com/docs/8.x/upgrade#queue-retry-after-method

Activity icon

Replied to Multi Role Social Login Or Register Laravel

@bobbybouwmann check the callback method - which have only $service and its only provide user data not the user type like he is seller or buyer.

so i thought i should use the callback url that should be end with seller and buyer but its also not possible with multiple redirect url.

so this is situation i want to know the user is sign up as seller or buyer so i can assign role for that particular user.

check this code in callback method

if ($user){
                if(\request()->segment(4) == "seller"){
                    $user->assignRole('seller');
                }elseif (\request()->segment(4) == "buyer"){
                    $user->assignRole('buyer');
                }
                if (!$token = auth('api')->login($user)) {
                    return response()->json(['error' => 'Unauthorized'], 401);
                }
                return $this->respondWithToken($token);
            }
Activity icon

Replied to Blade View For Rich Text Field On Description Tag

try this

<meta property="og:description" content="{{ $item->description }}">

or

<meta property="og:description" content="{!! strip_tags($item->description) !!}">
Activity icon

Replied to Refactor ModelNotFoundException Response Into Vue Page

ya its possible. You can return a response with any Exception. Check Below Code

Handler.php

<?php

namespace App\Exceptions;

use Exception;
use App\Traits\ApiResponser;
use Asm89\Stack\CorsService;
use Illuminate\Database\QueryException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;

class Handler extends ExceptionHandler
{
    use ApiResponser;
    /**
     * A list of the exception types that are not reported.
     *
     * @var array
     */
    protected $dontReport = [
        //
    ];

    /**
     * A list of the inputs that are never flashed for validation exceptions.
     *
     * @var array
     */
    protected $dontFlash = [
        'password',
        'password_confirmation',
    ];

    /**
     * Report or log an exception.
     *
     * @param  \Exception  $exception
     * @return void
     */
    public function report(Exception $exception)
    {
        parent::report($exception);
    }

    /**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Exception  $exception
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $exception)
    {
        $response = $this->handleException($request, $exception);
        app(CorsService::class)->addActualRequestHeaders($response, $request);
        return $response;
    }
    public function handleException($request, Exception $exception)
    {
        if ($exception instanceof ValidationException) {
            return $this->convertValidationExceptionToResponse($exception, $request);
        }
        if ($exception instanceof ModelNotFoundException) {
            $model_name = \strtolower(class_basename($exception->getModel()));
            return $this->errorResponse("Does't exists {$model_name} with the specifid identifier", 404);
        }
        if ($exception instanceof AuthenticationException) {
            return $this->unauthenticated($request, $exception);
        }
        if ($exception instanceof AuthorizationException) {
            return $this->errorResponse($exception->getMessage(), 403);
        }
        if ($exception instanceof NotFoundHttpException) {
            return $this->errorResponse("The specified URL can not found", 404);
        }
        if ($exception instanceof MethodNotAllowedHttpException) {
            return $this->errorResponse("The specified method for the request in invalid", 405);
        }
        if ($exception instanceof HttpException) {
            return $this->errorResponse($exception->getMessage(), $exception->getStatusCode());
        }
        if ($exception instanceof QueryException) {
            $error_code = $exception->errorInfo[1];
            if ($error_code == 1451) {
                return $this->errorResponse("Can't remove this resource permanently. It is related with any other reosurce", 409);
            }
        }
        if ($exception instanceof TokenMismatchException) {
            return redirect()->back()->withInput($request->input());
        }
        if (config('app.debug')) {
            return parent::render($request, $exception);
        }
        return $this->errorResponse('Unexpected Expection! Please Try Again Later', 500);
    }
    /**
     * Create a response object from the given validation exception.
     *
     * @param  \Illuminate\Validation\ValidationException  $e
     * @param  \Illuminate\Http\Request  $request
     * @return \Symfony\Component\HttpFoundation\Response
     */
    protected function convertValidationExceptionToResponse(ValidationException $e, $request)
    {
        $errors = $e->validator->errors()->getMessages();
        if ($this->isFrontend($request)) {
            return $request->ajax() ? response()->json($e, 422) : redirect()->back()->withInput($request->input())->withErrors($errors);
        }
        return $this->errorResponse($errors, 422);
    }
    protected function unauthenticated($request, AuthenticationException $exception)
    {
        if ($this->isFrontend($request)) {
            return redirect()->guest('login');
        }
        return $this->errorResponse("Unauthenticated User", 401);
    }
    private function isFrontend($request)
    {
        return $request->acceptsHtml() && collect($request->route()->middleware())->contains('web');
    }
}

ApiResponser Trait

<?php

namespace App\Traits;

use Illuminate\Support\Collection;
use Spatie\Fractal\Facades\Fractal;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Validator;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Cache;

/**
 * ApiResponser
 */
trait ApiResponser
{
    /**
     * successResponse
     *
     * @param  mixed $data
     * @param  mixed $code
     *
     * @return void
     */
    private function successResponse($data, $code)
    {
        return response()->json($data, $code);
    }

    /**
     * errorResponse
     *
     * @param  mixed $message
     * @param  mixed $code
     *
     * @return void
     */
    protected function errorResponse($message, $code)
    {
        return response()->json(['error' => $message, 'code' => $code], $code);
    }
    /**
     * showAll
     *
     * @param  mixed $collection
     * @param  mixed $code
     *
     * @return void
     */
    protected function showAll(Collection $collection, $code = 200)
    {
        if ($collection->isEmpty()) {
            return $this->successResponse(['data' => $collection], $code);
        }
        $transformer = $collection->first()->transformer;
        $collection = $this->filterData($collection, $transformer);
        $collection = $this->sortData($collection, $transformer);
        $collection = $this->paginate($collection);
        $collection = $this->transformData($collection, $transformer);
        $collection = $this->cacheResponse($collection);
        return $this->successResponse([$collection], $code);
    }
    /**
     * showOne
     *
     * @param  mixed $model
     * @param  mixed $code
     *
     * @return void
     */
    public function showOne(Model $model, $code = 200)
    {
        $transformer = $model->transformer;
        $model = $this->transformData($model, $transformer);
        return $this->successResponse([$model], $code);
    }
    /**
     * showMessage
     *
     * @param  mixed $message
     * @param  mixed $code
     *
     * @return void
     */
    public function showMessage($message, $code = 200)
    {
        return $this->successResponse(['data' => $message], $code);
    }
    protected function sortData(Collection $collection, $transformer)
    {
        if (request()->has('sort_by')) {
            $attribute = $transformer::originalAttribute(request()->sort_by);
            $collection = $collection->sortBy->{$attribute};
        }
        return $collection;
    }
    protected function filterData(Collection $collection, $transformer)
    {
        foreach (request()->query() as $query => $value) {
            $attribute = $transformer::originalAttribute($query);
            if (isset($attribute, $value)) {
                $collection = $collection->where($attribute, $value);
            }
        }
        return $collection;
    }
    protected function transformData($data, $transformer)
    {
        $transformation = Fractal($data, new $transformer);
        return $transformation->toArray();
    }
    protected function paginate(Collection $collection)
    {
        $rules = [
            'per_page' => 'integer|min:2|max:50',

        ];
        Validator::validate(request()->all(), $rules);
        $page = LengthAwarePaginator::resolveCurrentPage();
        $perPage = 15;
        if (request()->has('per_page')) {
            $perPage = (int) request()->per_page;
        }
        $result = $collection->slice(($page - 1) * $perPage, $perPage)->values();

        $paginated = new LengthAwarePaginator($result, $collection->count(), $perPage, $page, [
            'path' => LengthAwarePaginator::resolveCurrentPath(),
        ]);
        $paginated->appends(request()->all());
        return $paginated;
    }
    public function cacheResponse($data)
    {
        $url = request()->url();
        $queryParams = request()->query();
        ksort($queryParams);
        $queryString = http_build_query($queryParams);
        $fullUrl = "{$url}?{$queryString}";
        return Cache::remember($fullUrl, 30, function ()  use ($data) {
            return $data;
        });
    }
}

Activity icon

Replied to Code Editor

@bobbybouwmann is right. phpStorm take approx 1gb ram with normal development.

Activity icon

Replied to Code Editor

phpStorm is best for PHP Developer.

i use -

phpStorm for laravel and wordpress intellij Idea for flutter and nuxtjs

Activity icon

Replied to Changes To Laravel Resource Not Reflecting

check if varnish is enabled ? if yes then purge varnish cache. if no then review your code at server

Activity icon

Started a new Conversation Multi Role Social Login Or Register Laravel

i want to register a user on login if user isn't exist but i have 3 role. and i want to assign role on the social login but redirect url make me confuse. have a look to my code. i use socialite package. and also jwt package

.env

FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_REDIRECT='url'


GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT='url'

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_REDIRECT='url'

service.php in config

'facebook' => [
        'client_id' => env('FACEBOOK_CLIENT_ID', ''),
        'client_secret' => env('FACEBOOK_CLIENT_SECRET', ''),
        'redirect' =>  env('FACEBOOK_REDIRECT', ''),
    ],

    'google' => [
        'client_id' => env('GOOGLE_CLIENT_ID', ''),
        'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
        'redirect' =>  env('GOOGLE_REDIRECT', ''),
    ],
    'twitter' => [
        'client_id' => env('TWITTER_CLIENT_ID', ''),
        'client_secret' => env('TWITTER_CLIENT_SECRET', ''),
        'redirect' =>  env('TWITTER_REDIRECT', ''),
    ],

Routes

//seller social Login

Route::get('/redirect/{service}/seller', 'Auth\[email protected]');
Route::get('/callback/{service}/seller', 'Auth\[email protected]');

//buyer social Login

Route::get('/redirect/{service}/buyer', 'Auth\[email protected]');
Route::get('/callback/{service}/buyer', 'Auth\[email protected]');

SocialAuthController


<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;

class SocialAuthController extends Controller
{
    public function redirect($service)
    {
        return Socialite::driver($service)->redirect();
    }

    public function callback($service)
    {
        $userSocial = Socialite::with($service)->stateless()->user();

        $user = User::where(['email' => $userSocial->getEmail()])->first();
        if ($user) {
            if (!$token = auth('api')->login($user)) {
                return response()->json(['error' => 'Unauthorized'], 401);
            }
            return $this->respondWithToken($token);
        } else {
            $user = User::create([
                'name'          => $userSocial->getName(),
                'email'         => $userSocial->getEmail(),
            ]);
            $user->userProvider()->create(
                [
                    'image'         => $userSocial->getAvatar(),
                    'provider_id'   => $userSocial->getId(),
                    'provider'      => $service,
                ]
            );
            if ($user){
                if(\request()->segment(4) == "seller"){
                    $user->assignRole('seller');
                }elseif (\request()->segment(4) == "buyer"){
                    $user->assignRole('buyer');
                }
                if (!$token = auth('api')->login($user)) {
                    return response()->json(['error' => 'Unauthorized'], 401);
                }
                return $this->respondWithToken($token);
            }
        }
    }

    /**
     * Get the token array structure.
     *
     * @param string $token
     *
     * @return \Illuminate\Http\JsonResponse
     */
    protected function respondWithToken(string $token)
    {
        $access_url = auth('api')->user()->roles[0]->name ?: null;
        return response()->json([
            'access_token' => $token,
            'token_type' => 'bearer',
            'expires_in' => auth('api')->factory()->getTTL() * 60,
            'access_url' => '/' . $access_url
        ]);
    }
}


Activity icon

Replied to How To Add Number Of Days To Start Date In To Get End Date

you can do by the script....

try this one ---- with onchange event on number of days input

by the custom function

$('#dateto').datepicker("setDate", new Date(2020,9,17) );
Aug
28
2 months ago
Activity icon

Replied to Vuex API Data Is Empty

mutations: {
  updateUsers(state, users) {
    state.users = users
  }
}
Activity icon

Replied to Vuex API Data Is Empty

you need to add mutation - check Your code from VuexStore - commit('updateUsers',response.data.data);

After mutation you can get data - check more details here - https://vuex.vuejs.org/guide/mutations.html

Activity icon

Started a new Conversation Boostrap Modal Open Twice On Single Click

Im using bootstrap vue.

When i Press Add Category button or Delete Button Bootstrap Vue Modal open twice.....

I want to open only single modal

Code

<template>
  <div>
    <div class="d-flex justify-content-between">
      <h4>Categories</h4>
      <b-button v-b-modal.add-category variant="primary">Add Category</b-button>

      <b-modal
        id="add-category"
        title="Add New Category"
        ok-title="Save Category"
        @ok="id == null ? saveCategory():updateCategory()"
      >
        <b-form-input v-model="name" placeholder="Enter Category name"></b-form-input>
      </b-modal>
      <b-modal
        id="delete-category"
        title="Delete Category"
        @ok="deleteCategory"
      >
        <p>Want to Delete</p>
      </b-modal>
    </div>
    <table class="table table-hover">
      <tr>
        <th>Name</th>
        <th>Slug</th>
        <th>Actions</th>
      </tr>
      <tr v-for="(category, index) in categories.data" :key="category.id">
        <td>{{category.name}}</td>
        <td>{{category.slug}}</td>
        <td>
          <b-button
            v-b-modal.add-category
            variant="warning"
            size="sm"
            @click="onEdit(index, category)"
          >
            <i class="material-icons">edit</i>
            Edit
          </b-button>
          <b-button
            v-b-modal.delete-category
            variant="danger"
            size="sm"
            @click="id = category.id; current_index = index"
          >
            <i class="material-icons">delete</i>
            Delete
          </b-button>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  middleware: "auth",
  layout: "admin",
  name: "category-index",
  data() {
    return {
      categories: {},
      name: "",
      id: null,
      current_index: null,
    };
  },
  fetch() {
    this.fetchCategories();
  },
  methods: {
    async fetchCategories() {
      const categories = await this.$axios.$get("/category");
      this.categories = categories;
    },
    onEdit(index, category) {
      this.name = category.name;
      this.id = category.id;
      this.current_index = index;
    },
    async saveCategory() {
      try {
        this.$toast.show("Adding New Category");
        const category = await this.$axios.$post("/category", {
          name: this.name,
        });
        this.name = "";
        this.categories.data.push(category.data);
        this.$toast.success(
          category.data.name + " Category Added Successfully"
        );
      } catch (err) {
        if (err.response.status == 422) {
          for (const s_err in err.response.data.errors) {
            this.$toast.error(err.response.data.errors[s_err][0]);
          }
        }
      }
    },
    async updateCategory() {
      try {
        this.$toast.show("Updating Category");
        const category = await this.$axios.$put(`/category/${this.id}`, {
          id: this.id,
          name: this.name,
        });

        this.categories.data[this.current_index] = category.data;

        this.name = "";
        this.id = null;
        this.current_index = null;
        this.$toast.success(
          category.data.name + " Category Updated Successfully"
        );
      } catch (err) {
        if (err.response.status == 422) {
          for (const s_err in err.response.data.errors) {
            this.$toast.error(err.response.data.errors[s_err][0]);
          }
        }
      }
    },
    async deleteCategory() {
      try {
        this.$toast.show("Deleting Category");
        const category = await this.$axios.$delete(`/category/${this.id}`);
        this.categories.data[this.current_index] = {};
        this.id = null;
        this.current_index = null;
        this.$toast.success("Category Deleted Successfully");
      } catch (err) {
        //
      }
    },
  },
};
</script>