Click here to Skip to main content
16,020,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
php artisan make:mail WhateverName 



Gives this error:

UnexpectedValueException

 Invalid route action: [].

 at C:\Program Files (x86)\Ampps\www\instaclone\vendor\laravel\framework\src\Illuminate\Routing\RouteAction.php:92
    88▕      */
    89▕     protected static function makeInvokable($action)
    90▕     {
    91▕         if (! method_exists($action, '__invoke')) {
 ➜  92▕             throw new UnexpectedValueException("Invalid route action: [{$action}].");
    93▕         }
    94▕
    95▕         return $action.'@__invoke';
    96▕     }

 1   C:\Program Files (x86)\Ampps\www\instaclone\vendor\laravel\framework\src\Illuminate\Routing\RouteAction.php:47
     Illuminate\Routing\RouteAction::makeInvokable("")

 2   C:\Program Files (x86)\Ampps\www\instaclone\vendor\laravel\framework\src\Illuminate\Routing\Route.php:183
     Illuminate\Routing\RouteAction::parse("/", ["", ""])


What I have tried:

I have no clue what is going on. .Env file could be the culprit? But it's configured correctly.
Posted
Comments
[no name] 9-Dec-20 10:30am    
You would probably get a quicker response by asking laravel - it is their code.
BabyYoda 9-Dec-20 11:59am    
The error says the route action you are trying to create is not valid. You just need to fix what you are doing.
Demetri K.2 10-Dec-20 3:57am    
Can you be more specific?
BabyYoda 10-Dec-20 9:50am    
No, because I do not know what php artisan is. But a route is how urls work.

For example, https://www.somesite.com/Customers/View/1 would mean (in .Net terms) go to controller Customers and run action "View" on id 1.

mail Whatevername does not appear to be a valid route.

What are you trying to do?
Demetri K.2 10-Dec-20 16:09pm    
Route::get('/', '');

Auth::routes();

Route::post('follow/{user}', [App\Http\Controllers\FollowsController::class, 'store']);


Route::get('/', [App\Http\Controllers\PostsController::class, 'index']);
Route::get('/p/create', [App\Http\Controllers\PostsController::class, 'create']);
Route::post('/p', [App\Http\Controllers\PostsController::class, 'store']);
Route::get('/p/{post}', [App\Http\Controllers\PostsController::class, 'show']);

Route::get('/profile/{user}', [App\Http\Controllers\ProfilesController::class, 'index'])->name('profile.show');
Route::get('/profile/{user}/edit', [App\Http\Controllers\ProfilesController::class, 'edit'])->name('profile.edit');
Route::patch('/profile/{user}', [App\Http\Controllers\ProfilesController::class, 'update'])->name('profile.update');


All the routes that I have. I am not competent enough to see what is wrong with the routes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900