artcore

artcore

Software Engineer at Self employed

Member Since 2 Years Ago

Experience Points
16,780
Total
Experience

3,220 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
32
Lessons
Completed
Best Reply Awards
18
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 4
16,780 XP
May
27
6 days ago
Activity icon

Replied to Control Javascript Values/functions From Laravel Admin Panel

@irfanrufi

I'm not sure exactly what your intentions are but start with some basic gathering of data:

//sorry no jQuery ;)

const checkboxes = document.querySelectorAll('[type=checkbox]'),
checkboxContainer = document.getElementById('checkboxes');

const enableFunctionOne = ()=> { //love },
 enableFunctionTwo = ()=> { //magic },
 enableFunctionThree = ()=> { //science };


//do not add eventlisteners on each individual checkbox but on their parent, the container holding the checkboxes

checkboxContainer.addEventListener('change', e =>
{

//whenever a checkbox is checked/unchecked you can get it's value from e.target.value

const value = e.target.value;

if(value==='love')
 enableFunctionOne();

});

//run on pageload when DOMContentLoaded

checkboxContainer.dispatchEvent(new Event('change'));

//

All plain js. Now you know why jQuery got so popular ;) but I can tell you it's a relief not to rely on any framework in the long run.

May
23
1 week ago
Activity icon

Replied to Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

@ahmed96 Don't raise the php timeout, just make a fresh call to your controller for each chunk by chunking the requested file.

See http://www.resumablejs.com/ You can then merge all chunks into 1 file after all are in.

May
22
1 week ago
Activity icon

Replied to Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

When an upload takes more than the php timeout I think it will die. Also assume uploading a 10GB file takes 1 hour, without resumable pieces your client is screwed if it fails before it's fully uploaded. Plus you don't have to worry about the max_upload_size.

Activity icon

Replied to Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

Marhaba. Uploading is done via PHP which has a timeout of 30 secs default?

Google "laravel chunk upload" and "resumable js". There are many packages for it.

May
21
1 week ago
Activity icon

Replied to If Statement In Navbar Link

I would create a single endpoint 'dashboard' and sort out there where to redirect an authenticated user.

route('dashboard')

[email protected]()

$role = auth()->user()->getRole()

redirectTo()->route("$role-dashboard")

May
18
2 weeks ago
Activity icon

Replied to Control Javascript Values/functions From Laravel Admin Panel

Simply put you send data to the view and store (part of) it in a javascript variable.

return view('blade', ['jsVar'=>$anything]); // you could json_encode $anything
//blade

<script>const jsVar = $jsVar; </script>

// OR
//   window.MyNamespace = MyNamespace || {}; 
//   MyNamespace.jsVar = $jsVar; // good practice to contain it in your own namespace to prevent clashes


<script>

alert(jsVar);

</script>

May
16
2 weeks ago
Activity icon

Replied to Lumen 7 Class Blade.compiler Does Not Exist When Building Custom Blade Directives

I used this in Lumen 6 maybe works in 7 too

if ($this->app instanceof \Laravel\Lumen\Application)
    {
      /**
       * @var BladeCompiler $blade
       */
      $blade = $this->app['blade.compiler'];
      
      $blade->directive('csrf', function ()
      {
        return '<?php echo csrf_field(); ?>';
      });
      
      $blade->directive('method', function ($method)
      {
        return <<<HTML
<?php echo '<input type="hidden" name="_method" value="'.$method.'">'; ?>
HTML;
      });
    }
May
15
2 weeks ago
Activity icon

Replied to Ignore Form Request Required Rules On Update

There's an ignore for that from the docs

Forcing A Unique Rule To Ignore A Given ID:

Sometimes, you may wish to ignore a given ID during the unique check. For example, consider an "update profile" screen that includes the user's name, e-mail address, and location. You will probably want to verify that the e-mail address is unique. However, if the user only changes the name field and not the e-mail field, you do not want a validation error to be thrown because the user is already the owner of the e-mail address.

To instruct the validator to ignore the user's ID, we'll use the Rule class to fluently define the rule. In this example, we'll also specify the validation rules as an array instead of using the | character to delimit the rules:

use Illuminate\Validation\Rule;

Validator::make($data, [
    'email' => [
        'required',
        Rule::unique('users')->ignore($user->id),
    ],
]);
May
13
2 weeks ago
Activity icon

Replied to Swift_TransportException Failed To Authenticate On SMTP Server With Username

You probably have to use the whole email address. I see you're missing .TLD

Or maybe it doesn't allow non encrypted connections?

MAIL_ENCRYPTION=tls

or

MAIL_ENCRYPTION=ssl

May
08
3 weeks ago
Activity icon

Replied to Programmatically Login On Subdomain Without Sharing The Session

I have to add that I also changed the token part of cookie naming which is hardcoded to self::static in laravel. Not sure if you can change a cookie though as Laravel invalidates tampered with cookies. Although changing to a valid value may work lol.

May
07
3 weeks ago
Activity icon

Replied to Programmatically Login On Subdomain Without Sharing The Session

The cookie is by default using the APP_NAME or config(app.name,"Laravel") You could do a dynamic change on the cookie name generation per domain.

default: laravel_session_hash or yourAppName_session_hash

I used (sub)domain_session_hash and works just fine

Simply checking the Request->getHost() and change the cookie name in the config repo in a service provider or middleware that fires before 'web'.

May
04
4 weeks ago
Activity icon

Replied to How To Use Old Service Providers In Laravel 7?

I believe it's something like this

 $view->with(
     [
       'logged_in_user' => auth()->user()
     ]);

pass an array to the view and auth() is the helper to the authentication, I've never seen access()

May
03
4 weeks ago
Activity icon

Replied to Passing Variables To The Controller But Not From The URI

Maybe from the request path

Route::get('/{any}', '[email protected]')->where('any', '.*');
//top route wins so this could be last in your routes file

PageController::show(Request $request)

return view(string $request->path()) //could be pathname() I forgot.

try catch would be handy

May
01
1 month ago
Activity icon

Replied to Script @php Artisan Package:discover --ansi Handling The Post-autoload-dump Event Returned With Error Code 1

or add an alias to your .bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# User specific aliases and functions
alias a='php /home/user/laravel/artisan'
alias c='composer --working-dir=/home/user/laravel'

example would be "a cache:clear" and "c dumpautoload"

Apr
29
1 month ago
Activity icon

Replied to How To Remove Null From The Array While Inserting To Database

It looks like you need to

array_filter($data['sku'])

and above is enough - array_filter() already filters out nulls. In your example $value inside the closure is an array and not an array item

Apr
23
1 month ago
Activity icon

Replied to How Long Did It Take You To Swap Out Bootstrap For Your Own CSS Or Another CSS Framework In The Spark Blade Templates?

I don't know Spark but a few months (year? geez) I decided to kick bs out. Just got tired of the amount of markup and css classes needed for simple things. I had a bs without jQuery dependency btw

So considering you have to rewrite all your html markup, that could amount to a lot of time. On the other hand you can rewrite to reusable components and have a good dev speed boost for all your future projects.

Not to mention bs5 could be another learning curve like from bs2->3 (spans) and bs3->4 (flex)

time 'lost' today is time gained tomorrow

Apr
22
1 month ago
Activity icon

Replied to How Can I Avoid Doing The Same Things Over And Over

I am writing (composer) packages for reuse always and deploy using a private repo. For me there's no other way to have the same features on multiple sites. Plus writing your own stuff helps experience ;)

Apr
21
1 month ago
Activity icon

Replied to Missing Required Parameters Error In Production But Works Locally

Can you try without an array in the route()

route('tasks.update', $task->task_id) 

I think I had something similar after upgrading to 7

Apr
20
1 month ago
Activity icon

Replied to Generate Unique 8 Characters, Better Solution Beside Str::random(8) ?

If you don't mind 2 queries you can hash the primary key + username or something

insert -> get last inserted id -> update secret column with hash_hmac('sha1', id+user, config('app.key'));

That will be longer than 8 chars but at least no worries about uniqueness

Activity icon

Replied to Ajax View

Simply

if (request()->isXmlHttpRequest())
      return view('blade', $data)->render();

as your response.

Activity icon

Replied to Array Search With Array()

What have you tried? My first go would be using array_diff()

https://www.php.net/manual/en/function.array-diff.php

Apr
18
1 month ago
Activity icon

Replied to How To Best Format Data For Use In JqTree

I think you can do a recursive call on your categories and create the tree with your parent_id. So get all the records, nest them recursively on your parent_id.

And as an idea (I don't use Eloquent either) can't you do relationships creating two models with the same table? App\Models\Category, App\Models\Categories for instance? Not neat I know ;)

Activity icon

Replied to How To Prevent Concurrent Handling Of Requests Sent By Same User

@Jeffrey

stop removing new lines :) I use them on purpose

Activity icon

Replied to How To Prevent Concurrent Handling Of Requests Sent By Same User

Maybe: Can be middleware for reuse.

Unique session / cookie can make 1 request / minute

$queue = [];

$id = $request->cookie('student');

$queue[$id] = time();

Next try if cookie is in array keys of $queue compare time and exit() Don't return a response to keep the server happy.

Apr
15
1 month ago
Activity icon

Replied to CSRF Token Mismatch (the Server Responded With A Status Of 419)

Maybe do a heartbeat every hour? Has to be a POST or update PUT,PATCH for the csrf to kick in.

Apr
14
1 month ago
Activity icon

Replied to Session Issues: 419 Error After Signing In

When I see a 419 it's usually a csrf token mismatch or none sent. Do you have the VerifyCsrfToken somewhere in your middleware of that route?

Activity icon

Replied to How To Validate Bcrypt Password

You mean behind the scenes? By chance I had to do this yesterday.

PHP's password_hash() creates the hash with a number of algorithms including BCRYPT - the laravel default

$pw = password_hash( your-pw, BCRYPT_HASH ) -> stored in DB

PHP password_verify(input, hash)

password_verify( your-pw, $pw ) -> true|false

No need to tell it the hash was created with bcrypt

https://www.php.net/manual/en/function.password-verify.php

Apr
12
1 month ago
Activity icon

Replied to Share Business Logic Between Web App And Api

I would use a job (Command Bus) which can be used in a controller and also console for instance

UsersController some auth middleware

index() dispatch_now(...new GetUsersJob())

================================

ApiUsersController some other auth middleware

index() dispatch_now(...new GetUsersJob())

================================

Artsisan console handle() dispatch_now(...new GetUsersJob())

https://laravel.com/docs/7.x/queues#creating-jobs

They can be queued to run later on a new thread dispatch() or right away dispatch_now

Very handy and flexible and no need for complex service layers although a repository may work too come to think of it ;)

Apr
10
1 month ago
Activity icon

Replied to Job Chances For A 40 Year Old Developer

I'm closing in on 50 and my life experience has always been a deciding factor to land the bigger job. Feel lucky to not be 20-something, they know nothing ;)

Apr
09
1 month ago
Activity icon

Replied to Laravel/ui

@terreporter Lumen has a completely different route system from Laravel so it's likely that laravel/ui is not compatible with Lumen

laravel/ui - It's the auth scaffolding, routes, controllers, views from Laravel <7 extracted to it's own composer package. Passport is for api auth so generally no state/sessions/views

Apr
08
1 month ago
Activity icon

Replied to Laravel/ui

In your bootstrap/app.php, make sure you've uncommented:

$app->withFacades();

Not sure if this package uses sessions (it's <7 Laravel's auth extracted) so you may wanna check https://laravel.com/docs/7.x/sanctum

Apr
07
1 month ago
Activity icon

Awarded Best Reply on Handle Databases Users In Multi-tenant App

I set up databases per user as well, simply because the data is too huge per tennant, millions of rows in several tables. I'm sure you got the connection switching down. I'm using a single main user so I can easily fetch across several dbs with an easy config. No one else has access in my case.

Here's an example of my config.

<?php
$default = [
  'driver'      => 'mysql',
  'host'        => env('DB_HOST', '127.0.0.1'),
  'port'        => env('DB_PORT', '3306'),
  'database'    => env('DB_DATABASE', 'forge'),
  'username'    => env('DB_USERNAME', 'forge'),
  'password'    => env('DB_PASSWORD', ''),
  'unix_socket' => env('DB_SOCKET', ''),
  'charset'     => 'utf8mb4',
  'collation'   => 'utf8mb4_unicode_ci',
  'prefix'      => '',
  'strict'      => false,
  'engine'      => 'InnoDB',
];

return [
  
  'default' => env('DB_CONNECTION', 'mysql'),
  'connections' => [
    'mysql'     => $default,
    'app'       => array_replace($default, ['database' => 'app']),
    '10013'     => array_replace($default, ['database' => '10013']),
    '10014'     => array_replace($default, ['database' => '10014']),
    '10015'     => array_replace($default, ['database' => '10015']),
    '10016'     => array_replace($default, ['database' => '10016']),
    '10017'     => array_replace($default, ['database' => '...
  ],
  
  'migrations' => 'migrations',
];
Activity icon

Replied to Handle Databases Users In Multi-tenant App

I set up databases per user as well, simply because the data is too huge per tennant, millions of rows in several tables. I'm sure you got the connection switching down. I'm using a single main user so I can easily fetch across several dbs with an easy config. No one else has access in my case.

Here's an example of my config.

<?php
$default = [
  'driver'      => 'mysql',
  'host'        => env('DB_HOST', '127.0.0.1'),
  'port'        => env('DB_PORT', '3306'),
  'database'    => env('DB_DATABASE', 'forge'),
  'username'    => env('DB_USERNAME', 'forge'),
  'password'    => env('DB_PASSWORD', ''),
  'unix_socket' => env('DB_SOCKET', ''),
  'charset'     => 'utf8mb4',
  'collation'   => 'utf8mb4_unicode_ci',
  'prefix'      => '',
  'strict'      => false,
  'engine'      => 'InnoDB',
];

return [
  
  'default' => env('DB_CONNECTION', 'mysql'),
  'connections' => [
    'mysql'     => $default,
    'app'       => array_replace($default, ['database' => 'app']),
    '10013'     => array_replace($default, ['database' => '10013']),
    '10014'     => array_replace($default, ['database' => '10014']),
    '10015'     => array_replace($default, ['database' => '10015']),
    '10016'     => array_replace($default, ['database' => '10016']),
    '10017'     => array_replace($default, ['database' => '...
  ],
  
  'migrations' => 'migrations',
];
Apr
06
1 month ago
Activity icon

Replied to How To Save Item That Has Items Inside Using Eloquent

If your payload is something like this

$product => [

title => title,
decsription => [
   en => title-en
],
options =>[
   [
      required => yes
      items => [
        name => option-name
        price => 0.00
      ]
   ]
]

then you'd loop the items, store the item, get the ID of the inserted item, use that for storing options.

$id = pdo->getLastInsertedId();

foreach (items as item)
   store item
   get the ID -> $id //last inserted ID

//loop inside items loop
foreach (item[options] as option)
   option_id => $id,
   name,
   price

Lot of pseudo code but you get the idea. Now we need someone to translate it to Eloquent ;)

Apr
03
1 month ago
Activity icon

Replied to Old Input Not Working When Using AJAX Drop Down Dependent List

Simply don't redirect back if you're using ajax and all inputs will remain. Use the ajax callback to populate errors and what not from the validation. You may need a preventDefault() on the button submit handler to prevent the page from refreshing.

Activity icon

Replied to Array Keys Sorting

$newArray = [];
array_map(function($item) use(&$newArray)
{

//item is
/*
1496373898 => array:2 [▼
      0 => array:1 [▼
        "first_term" => array:12 [▶]
      ]
      1 => array:1 [▼
        "second_term" => array:12 [▶]
      ]
    ]
*/

$newArray[key($item)] = array_values($item);


}, $yourArray);

$yourArray = $newArray;

Can't think of a more magical way right now ;)

Mar
31
2 months ago
Activity icon

Replied to Laravel Large Application Structure

A composer package for laravel is in essence modular and with auto-discover all you do is require it via composer and it's ready to go. You can have the package set up with all you needs - controller, model, routes, views, config etc. In the ServiceProvider of your app you can set this all up. Easy and the only way to do it imho

https://laravel.com/docs/master/packages

Activity icon

Replied to Connect With Remote Database On CPANEL?

If you have root access to .users table you can check if the host is your home IP

Mar
30
2 months ago
Activity icon

Replied to Use Of @include() Blade Directive Inside The Javascript

use javascript import() or have a condition in your php controller that has the script link. You can't use javascript to infuence php. Php - server side - is done at the moment you have it your browser

Activity icon

Awarded Best Reply on Array Paremters In WHERE IN Condition

@klik

| What i I have another two params like "WHERE p.id IN ($condition) AND p.owner_id = :id AND p.status = :status"?

No problem, the placeholders are in order. It's easier to use indexed placeholders in stead of named. And btw in the array you don't need to use the colon : - it's optional.



#static class Condition
public static function in(array $collection): string
  {
    $collection = array_merge(array_filter(array_unique($collection)));
    $count      = count($collection);
    
    if ($count > 0)
    {
      self::$params = array_merge(self::$params, $collection);
      
      return 'IN (' . str_repeat('?,', count($collection) - 1) . '?)';
    }
  }
  



$id = Condition::in([1,2,3]); // -> IN(?,?,?)
$something = Condition::notIn([0,9,8]);// -> NOT IN(?,?,?)
$lang = Condition::equals('en');// -> = 'en';

Condition::$params = [1,2,3,0,9,8,'en']; // collected from all Conditions

select * from table where id $id and something $something and lang $lang.

Basically what I do but the implementation is of course much nicer than this;) Nothing to do with Laravel though, I made my own ORM, but it's simple to use

->where('status', Condition::equals(1))
                      ->and('meta_description', Condition::like('rental'))
                      ->orderBy('sort_order=0,sort_order', 'ASC')
Activity icon

Replied to Array Paremters In WHERE IN Condition

@klik

| What i I have another two params like "WHERE p.id IN ($condition) AND p.owner_id = :id AND p.status = :status"?

No problem, the placeholders are in order. It's easier to use indexed placeholders in stead of named. And btw in the array you don't need to use the colon : - it's optional.



#static class Condition
public static function in(array $collection): string
  {
    $collection = array_merge(array_filter(array_unique($collection)));
    $count      = count($collection);
    
    if ($count > 0)
    {
      self::$params = array_merge(self::$params, $collection);
      
      return 'IN (' . str_repeat('?,', count($collection) - 1) . '?)';
    }
  }
  



$id = Condition::in([1,2,3]); // -> IN(?,?,?)
$something = Condition::notIn([0,9,8]);// -> NOT IN(?,?,?)
$lang = Condition::equals('en');// -> = 'en';

Condition::$params = [1,2,3,0,9,8,'en']; // collected from all Conditions

select * from table where id $id and something $something and lang $lang.

Basically what I do but the implementation is of course much nicer than this;) Nothing to do with Laravel though, I made my own ORM, but it's simple to use

->where('status', Condition::equals(1))
                      ->and('meta_description', Condition::like('rental'))
                      ->orderBy('sort_order=0,sort_order', 'ASC')
Activity icon

Replied to Array Paremters In WHERE IN Condition

@klik

$condition = str_repeat('?,', count([1,2,3]) - 1) . '?';

$raw = DB::SELECT("

            SELECT
               *
              FROM places p
              WHERE p.id IN ($condition)
            ", [1,2,3]);

Stay close to the laravel ways, UsmanBasharal probably has the best answer.

Mar
29
2 months ago
Activity icon

Replied to Array Paremters In WHERE IN Condition

I use a str_repeat repeater to create ? inside the IN()

Excerpt from my method to return this part of the query.

return 'IN (' . str_repeat('?,', count($collection) - 1) . '?)';

//or for composite
str_repeat('(?,?),', count($collection) - 1) . '(?,?)';
$raw = DB::SELECT("

            SELECT
               *
              FROM places p
              WHERE p.id IN (?,?,?)
            ", [1,2,3]);
Mar
27
2 months ago
Activity icon

Replied to Fix My Ugly Code! Using Assets!

base can be handy or a real pita ;)

<base href="/storage/product/">
</head>
<img src="{{ $product->img }}" alt="">

Otherwise I would do what piljac1 did

Mar
24
2 months ago
Activity icon

Replied to Asking For An Advise On Multiple Laravel Projects On A Single Server

If you have ssh shell for composer for instance, keep in mind the devs will be able to see the whole server unless you chroot them. If each project has it's own laravel you need to have several contained installations. I think I saw some posts on how to share a laravel base for multiple sites but I assume you will have separate projects going on.

var/www/domain1 ---laravel ---public index

var/www/domain2 ---another laravel ---public index

You can set up sshd to chroot your users with a restricted shell eg https://www.cyberciti.biz/faq/unix-linux-chroot-command-examples-usage-syntax/

cPanel has a jailed shell but not fully hardened!

Activity icon

Replied to Connect With Remote Database On CPANEL?

Did you enable "remote DB" in cpanel? And if you have a firewall you may need to allow your remote IP to access udp on port 3306

Mar
23
2 months ago
Activity icon

Replied to Datatables - Search Box Outside Datatable (Laravle/Vuejs)

I forgot how to do it in jQuery;)

var table = document.getElementById('datatable-fixed-header30');

jQuery caches the element after dom ready - which doesn't exist anymore after a redraw do you have to get it 'live' from the document / DOM.

Mar
22
2 months ago
Activity icon

Replied to Javascript Not Working ( I Am New To It )

It's best practise to not use inline js. Consider this example

document.addEventListener('DOMContentLoaded', (event) => 
{

//the page is fully loaded, all DOM nodes are in and js is parsed

// get a handle on the element you want to listen to
const select = document.getElementById('exampleFormControlSelect1');

// click, keyup, ... depending on the input and action you want to listen to
// typically `change` on select dropdowns

select.addEventListener('change', (event) => 
{
    console.log(event.value);

    alert(`you selected ${event.value}`);
});

});

Using es6 or ES2015 with arrow functions and string literals in stead of concatenating with '+'

I got a lot from here: https://eloquentjavascript.net/index.html

Mar
21
2 months ago
Activity icon

Replied to Too Much Data Sent Causes Connection Closed (Laravel Nova Filter)?

@heykatieben

Is it a GET request? The max url length is 2048 I think! Are the 2 requests the same? You know, you said the new tab failed after the first succeeded...

You have to check every path of the request and start your system with a verbose error mode. eg https://docs.nginx.com/nginx/admin-guide/monitoring/debugging/

Or try to strace the PID of nginx to see what's happening behind the scenes.

I tried finding something related to nginx for you since I don't use it, but strace is superhandy to make sense of head scratchers

https://echorand.me/posts/strace-nginx/