Support the ongoing development of Laravel.io →
Installation Configuration Requests
Last updated 2 years ago.
0

Me, too.. that problem..

[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Bus\Dispatcher::mapUsing()

0

I've it fixed by update The Base Controller file.

<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

abstract class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
Last updated 8 years ago.
0

still problem exists.

0

My Solve is..

        // $dispatcher->mapUsing(function($command)
	// {
	// 	return Dispatcher::simpleMapping(
	// 		$command, 'App\Commands', 'App\Handlers\Commands'
	// 	);
	// });

I commented out. and still tracing. More I found, http://laravel.io/forum/03-19-2015-command-bus

update

https://laracasts.com/discuss/channels/laravel/upgrading-to-laravel-52-undefined-method-illuminatebusdispatcher

Last updated 8 years ago.
0

5.2 Upgrade Guide

Separate Commands & Handlers

The Laravel 5.2 command bus now only supports self-handling commands and no longer supports separate commands and handlers.

If you would like to continue using separate commands and handlers, you may install a Laravel Collective package which provides backwards-compatible support for this: https://github.com/LaravelCollective/bus

Check any service providers you have registered to make sure they aren't calling that method on dispatcher, including any package service providers.

Last updated 8 years ago.
0

I'd also recommend checking out https://github.com/AltThree/Bus.

0

I've worked out what causes this problem as I've just been through the same thing.

It's due to a missed step in the upgrade to 5.0.16. Specifically:

The App\Providers\BusServiceProvider may be removed from your service provider list in your app.php configuration file.

Seems that this is no longer used but not removing it doesn't cause any issues until the 5.2 upgrade.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Vimal10 vimal10 Joined 2 Jul 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.