Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
962 views

I want to use different error pages for the admin panel and the frontend in Laravel 12. I created a custom exception class for this purpose, but I haven’t figured out how to activate or use it yet. ...
Tuğran Demirel's user avatar
0 votes
3 answers
310 views

I'am kind of new to laravel and currently working with pipelines. As I know, if one step inside the Pipeline fail, the whole Pipeline get stopped at that step. That is exactly what I want, so I'am ...
MaxWeb's user avatar
  • 169
0 votes
1 answer
23 views

On laravel 10 site I made a method which returns true or ItemValidAccess exception in case of invalid data : /** * Determine whether logged user have access to complete item * * @...
Petro Gromovo's user avatar
1 vote
1 answer
1k views

Trying to create an API server with laravel. I have seen many tutorials that catch the exception thrown in the service layer. However, in Laravel, we have an option to create a custom error handler ...
user275157's user avatar
  • 1,362
0 votes
1 answer
72 views

On laravel site in controller I catch custom KeyIsNotProvidedException Exception: <?php try { $data = $this->method(); ... } catch (...
Petro Gromovo's user avatar
1 vote
2 answers
2k views

I am working with the Laravel 9 application. I have created a custom Exception. I want to report the General Exception to the sentry and this custom Exception to another vendor like Papertrail. The ...
Sachin Kumar's user avatar
  • 3,276
1 vote
0 answers
370 views

In laravel 9 I have ProductCardReport component which is on blade form and data are retrieved from ReportProduct class. I got data with firstOrFail in this class and I failed to catch this error in ...
mstdmstd's user avatar
  • 3,309
0 votes
1 answer
374 views

On laravel 9 site in my custom class method raise custom error with error message <?php class CustomClass { use Illuminate\Database\Eloquent\ModelNotFoundException; ...
Petro Gromovo's user avatar
0 votes
1 answer
617 views

I'm doing a migration and I want the execution of "artisan migrate" to stop until a field does not have the value 'CONTACT_INFO' inside. What I want to do is an exception when I detect that ...
braian romero's user avatar
1 vote
1 answer
56 views

In laravel 9.26.1 app I make tests with phpunit ^9.5.10 and I want to make checks on raised exceptions on login with invalid credentials In app/Http/Requests/Auth/LoginRequest.php I see : public ...
mstdmstd's user avatar
  • 3,309
1 vote
0 answers
525 views

In my composer file I have "spatie/laravel-ignition": "^1.2" however when an exception is thrown I am seeing the Symfony exception page rather than Ignition (shown below). .env has ...
J Foley's user avatar
  • 1,097
1 vote
1 answer
6k views

Is there any difference when I throw ValidationException manally and when ValidationException is thrown by laravel from FormRequest. Following code will clear the problem UserController.php public ...
Ahmar Arshad's user avatar
0 votes
1 answer
3k views

I'm getting an error in my Laravel logs almost everyday, but the error message doesn't tell me which one of my views or controllers is causing the error. It's a FormRequest.php error, so I know it's a ...
GTS Joe's user avatar
  • 4,252
0 votes
0 answers
184 views

I am looking to return a view from the HttpException that is triggered by my package's middleware, currently, it returns a static 403 exception and I'd like to change that to a custom view from the ...
Lewis's user avatar
  • 23
0 votes
1 answer
501 views

I'm working on handling exceptions in my Laravel project. I'm handling them in the Handler like this: public function render($request, Exception $exception) { if ($exception instanceof \...
Federico Arona's user avatar
0 votes
1 answer
617 views

I'm handling laravel exceptions such as NotFoundHttpException and UnauthorizedException by type-checking exceptions in the exception handler's render method, making a lot of instanceof checks which ...
Monica Magdy's user avatar
0 votes
2 answers
5k views

Since I started with my first Laravel project I've been having the error Trying to get property 'column_name' of non-object nonstop, and most of the time I've been able to fix it one way or another, ...
Francisco Cox's user avatar
5 votes
3 answers
5k views

I want to log 404 errors in Laravel 5.7, but I don't understand how to turn this on. Additional to logging 404 errors, I'd like to log the URL that was requested. Other errors are logged correctly. ....
eskimo's user avatar
  • 2,645
2 votes
3 answers
205 views

I'm trying to create a new "Airborne" test in my program and getting a 405 MethodNotAllowed Exception. Routes Route::post('/testing/{id}/airbornes/create', [ 'uses' => 'AirborneController@...
Curtis Thompson's user avatar
2 votes
3 answers
18k views

Before posting this question I have searched internet for appropriate answers but got none.These are my following questions: 1) How to throw exception without try catch in laravel controller and get ...
Rahul's user avatar
  • 2,480
1 vote
2 answers
2k views

I have a website which is developed in Laravel. Problem: I have a route method (POST) Route::post('/profile/edit/save', 'ProfileController@save'); if I enter this url "mywebsite.com/profile/edit/...
Abdes's user avatar
  • 1,006
0 votes
3 answers
7k views

I am using a package https://github.com/barbushin/php-imap to read email from mail server, I have the following code $folder = Storage::disk('local')->getAdapter()->getPathPrefix(); try { $...
Joyal's user avatar
  • 2,691
0 votes
1 answer
857 views

I am doing a project in Laravel 5.6 homestead. I got this error after i ran php artisan cache:config, the command ran successfully but after I ran this command and refreshed the url in my browser, I ...
Prakash Poudel's user avatar
0 votes
2 answers
1k views

I have such a simplified version of a class class Handler extends ExceptionHandler { protected $dontReport = []; public function report(Exception $exception) { $environment = \...
D.R.'s user avatar
  • 2,938
2 votes
1 answer
8k views

I have created a custom exception class in Laravel 5.2. It works well till laravel 5.4. When Im trying to use the same custom exception class with laravel 5.5 it is throwing following error. Type ...
Lakshmaji's user avatar
  • 1,321
4 votes
2 answers
12k views

In the following code in app/Exceptions/Handler.php, the first one doesn't work but the second one does. dd(get_class($exception)); outputs "Illuminate\Database\Eloquent\ModelNotFoundException". ...
shin's user avatar
  • 32.9k
0 votes
3 answers
975 views

For example, I use: return User::findOrFail($id); When row does not exist with $id I get exception. How I can return this exception in Json response? It returns HTML Laravel page now. I need ...
Dev's user avatar
  • 1,073