578 questions
-4
votes
1
answer
41
views
What is the difference in feature test and unit test in laravel? [closed]
I'm new to testing in Laravel and I used to think that unit tests and feature tests were the same thing.
But now I realize there's a big difference between them.
Can someone please explain—preferably ...
0
votes
0
answers
24
views
Issue in Excel Export in Laravel 11 it caches results
I am using maatwebsite/excel Export In Laravel 11.0 but I am facing an issue it is ignore any changes I made in the controller or in the export class
here is my export class code:
namespace App\...
0
votes
1
answer
49
views
How can I integrate paypal in stripe with subscriptions [closed]
I want to enable paypal payment method in stripe , stripe gives me an option to add paypal in custom payment methods but not in payment methods it's in custom payment methods alright so I manage ...
1
vote
1
answer
51
views
Laravel Scramble generate docs for https routes not working
I have Laravel 11.x app developing on Github Codespaces. I am trying to generate the documentation using Scramble package.
Github Codespaces publish urls are using https.
I am using api_domain entry ...
3
votes
2
answers
88
views
Laravel Disk b2 (backblaze) not working in Laravel 11
This is my config/filesystems.php:
'b2' => [
'driver' => 's3',
'key' => '*************',
'secret' => '**************',
'region' => 'us-west-002',
...
-1
votes
0
answers
26
views
Laravel middleware and router : Order of execution
i have question about the order execution between middleware and route. which one will be executed first.
for example, i have dd('hello from middleware') and i also put dd('hello from router'), which ...
1
vote
1
answer
50
views
Importing node_modules from a dedicated Node.js project
I am currently Using Laravel 10 (I know it's outdated and I will upgrade asap), and I have node_modules folder inside the project because i installed some npm modules that I need.
But I need to move ...
0
votes
0
answers
59
views
Intervention Image and Laravel 11
I am having a problem with intervention image and Laravel 11. I am upgrading a program which is fine with Laravel 10.
I installed with
composer require intervention/image-laravel
and then ran
php ...
0
votes
1
answer
55
views
Laravel Dependency Injection running before Middleware
I was under the impression that middleware runs BEFORE the route functions it wraps around.
Route::middleware([MyMiddleware::class])->group(function() {
// routess
});
But if one of the routes ...
0
votes
1
answer
18
views
CC and BCC give Cannot access offset of type string on string in
When I try to send an email with CC, BCC, or both CC and BCC, I get the following error: "Cannot access offset of type string on string." If I send the email without CC or BCC, there is no ...
1
vote
1
answer
98
views
Issue after Upgrading to Laravel 11: Undefined array key “driver”
I followed all the upgrade guide requirements, but when I run php artisan, I get the following error:
Undefined array key "driver"
at vendor/laravel/framework/src/Illuminate/Filesystem/...
0
votes
0
answers
19
views
Auth::user() Returns null Even with Valid Token (Laravel Sanctum)
I'm working on a Laravel 11 API using Sanctum for authentication. I have a route protected by the auth:sanctum middleware, and I'm sending a valid token in the request header. However, when I try to ...
0
votes
0
answers
44
views
Laravel 11 Sanctum Authentication Issues: 401 Unauthorized on /api/user and /api/logout (React Frontend)
I'm working on a Laravel 11 backend with a React frontend using Laravel Sanctum for authentication.
Login and Logout work, but after logging in, I still get 401 Unauthorized when fetching the ...
0
votes
1
answer
88
views
Laravel 11 - how to call the old 'Handler.php' class from app.php - withExceptions
I have recently created a new project in Laravel 11 and can not get my custom error handling class to work. I have a class I use throughout all my Larvael projects (laravel 10). I want to use this ...
0
votes
1
answer
27
views
Larastan v2 - wrong return type using find
I have a method that performs a find() and return the model, like this:
function getRecord(string $id): MyModel
{
return MyModel::query()->findOrFail($id);
}
With this code I get the following ...