Answers for "laravel error page"

PHP
1

laravel custom error page

php artisan vendor:publish --tag=laravel-errors
Posted by: Guest on April-27-2021
2

nuxt error page

// layouts/error.vue
<template>
  <div class="nuxt-error">
    <component :is="errorPage" :error="error" />
  </div>
</template>
<script>
import error404 from '~/components/error/404.vue';
import error500 from '~/components/error/500.vue';
export default {
  name: 'nuxt-error',
  layout: 'default', // optional
  props: {
    error: {
      type: Object,
      default: () => {},
    },
  },
  computed: {
    errorPage() {
      if (this.error.statusCode === 404) {
        return error404;
      }
      // catch everything else
      return error500;
    },
};
</script>
Posted by: Guest on July-21-2020

Browse Popular Code Answers by Language