Error 404

How works Error 404 page?

Error screen throws with any url requested that not fit with route arrays, The default page look like this:

Actually Error 404 page its a view, you could find it to customize it in:

$ resources/Views/modules/errors/

In that path you would find many errors views. You could customize your error404.php page as you want, we give some example there to create your own:

<?php incLayout('welcomeHeader'); ?>
<h1 class="text-left">
    <i class="fa fa-exclamation-circle text-danger" aria-hidden="true">
    </i> 
    Error 404 Page not found!
</h1>

You will find HTML and other very useful helper to your views:

<?php incLayout('welcomeHeader'); ?>
//is useful because it avoid you to create an include
//with all the path to layout folder
//Please remember includes are not highly recomended
//because the path its not relative to the view
//path its relative to root-dir/public/index.php
//So Booster provide a helper to get easy to handle includes

What if I want to create Layouts in other folder?

Its easy just use incView() helper, this helper is going to be touch in Views section, but alternativly you could find the definition in cheatcode section, there are a list of all helpers.

By the moment, you could go to:

$ resources/Views/layouts/

In that path you will find the welcomeHeader.php file, you could rewrite it or create your own,

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="<?php asset('css/bootstrap-4/bootstrap.min.css');?>">
    <!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> -->
    <link rel="stylesheet" href="<?php asset('css/font-awesome-4.7/font-awesome.min.css');?>">
    <link rel="stylesheet" href="<?php asset('css/welcome/style.css');?>">
    <title>PHP BOOSTER!</title>
</head>
<body class="bg-light">
    <div class="container">
        <div class="col-md-12 text-center">
            <div class="brand">
                <h1><img src="<?php asset('css/welcome/images/logo-1.png');?>" alt="Icon"> PHP BOOSTER!</h1>
            </div>
            <hr>

Its a very simple HTML template, but it have one helper that is commonly use for layouts as header.php or footer.php or any other order that you prefer.

<?php asset('css/welcome/images/logo-1.png');?>
//helper as shorcut to public/assets folder
//Its important to tell that for security reasons
//ONLY PUBLIC FOLDER COULD STORE ASSETS, DOCUMENTS, IMAGES
//OR ANY OTHER SOURCE LIKE CSS THEMES AND LIBRARIES OR JS SCRIPTS

Later in view section is going to be touch details and helpers of this section, by the moment you could use any CDN or your own styles and change it, or take a look to

$ public/assets/

To discover some great features that are already added to the framework, like:

  • Bootstrap 3.

  • Bootstrap 4.

  • MaterializeCSS

  • SB-ADMIN

  • SB-ADMIN-TWO

  • MATERIAL-DASHBOARD THEME (created specially for PHP Booster)

And other cools stuffs like FontAwesome 4 and Free version 5, The included with Bootstrap 3 glyphicons, some interesting fonts of google fonts, all locally to include with asset() helper.

Last updated