Tag: programming

  • How to have universal password in Laravel

    In Laravel, you can create “master password” which can be used with original one.

    It’s usually used for testing and development purposes.

    This can be done using the following package:

    https://github.com/imanghafoori1/laravel-MasterPass

  • Buttons Types in HTML

    Buttons can be of different types in html, for example if you have a form, the submit button would be of type=’submit‘. There are also two other types which are: ‘button‘ and ‘reset‘.

    The ‘button‘ type does not do anything by default but can be listened to using javascript. The ‘reset‘ type resets all form controls to their default values.

    These are some examples:

    <button type="button">Click Me!</button>
    <button type="submit">Submit</button>
    <button type="reset">Reset</button>

  • PHP Null Coalescing Operator

    In php 7 you can check if a variable contains null value and assign accordingly:

    $a = $x ?? 'default';