Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/04/2019 in all areas

  1. 1 point
    Instead of reinventing the wheel, use navigator.cookieEnabled. It looks like it's available across all browsers, and it's a lot less typing. If it returns false, pop up a modal telling the user they need to enable cookies. If it returns true, do whatever you need with cookies.
  2. 1 point
    Use array_intersect(), arrays, and CSS and save yourself all that repetition <?php $arrays = [ 'A' => [2, 6, 8, 11, 14, 18, 24], 'B' => [1, 2, 9, 10, 13, 14, 25, 28], 'C' => [1, 3, 7, 9, 13, 15, 20, 21, 24], 'D' => [4, 5, 12, 22, 23, 27, 28, 29] ]; $input = '2,15,37,13,28'; $parts = explode(',', $input); ?> <!DOCTYPE html> <html> <title>Example</title> <style type='text/css'> table { border-collapse: collapse; } th, td { font-family: verdana,arial,helvetica,sans-serif; font-size: 12px; } th { background-color: #DCDCDC; color: #000; text-align: left; padding: 4px; } td { padding: 4px; } </style> <body> <table border='1'> <?php foreach ($arrays as $gp => $a) { echo "<tr><th>GROUP $gp</th><td>" . join(', ', array_intersect($a, $parts) ) . "</td></tr>\n"; } ?> </table> </body> </html>
  3. 1 point
    Not that I'm aware of. With that said, docker only uses the .env file to set variables that are used during the docker-compose pre-processing stage. You also might be well advised to have some directory structure where your laravel app code is not in the root of the project where it would conflict with docker files. I would also suggest taking a look at how Laradock does things.
This leaderboard is set to New York/GMT-04:00
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.