Support the ongoing development of Laravel.io →
Laravel Views

php artisan make:mail WhateverName

Gives this error:

Hide Copy Code

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("/", ["", ""])

Last updated 3 years ago.
0
moderator

It means there is something wrong in your route files, I suspect you get the same error if you try to run php artisan route:list

0

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.

0
moderator

The first route is invalid, if you remove it you will be fine.

Route::get('/', '');
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

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.

© 2025 Laravel.io - All rights reserved.