PHP Laravel – mod rewrite does not work

I have used following command in terminal: php artisan make:auth which should enable for me authenticating and create all views and routes, which was successful. The problem for me is, if I want for example go to the login page, it shows me 404 error at following URL:

http://localhost/myproject/login

But following URL shows everything correctly.

http://localhost/myproject/index.php/login

So I'm trying to remove that "index.php". I was looking for some advices here and tried almost everything, but nothing works for me. mod_rewrite is enabled and these following lines I have in htaccess.

RewriteEngine On
RewriteBase //
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

But it does not work. It runs on MacOS High Sierra 10.13.3. Thanks for any advices.