Whenever I got a Laravel project to do some front-end work on it, I always had some issues during installation or had to configure it further. This is a guide to fix some common issues.
2021-09-16composer global require laravel/installer
composer install
php artisan key:generate
composer update
sudo /opt/lampp/lampp start
| or start GUI in windowsphp artisan serve
npm run watch
install composer package from package manager
php --ini
to check php config location/etc/php/php.ini
extension=gd
extension=iconv
php artisan key:generate
pdo_mysql extension
in the php.ini
.env
filefollow this guide: https://linux4one.com/how-to-install-xampp-on-manjaro-18
add to webpack.mix.js:
mix.sourceMaps() .webpackConfig({ devtool:'source-map' }) .sass('resources/sass/main.scss', 'public/css') .js('resources/js/app.js', 'public/js') .copy('resources/images/*.png', 'public/images') .copy('resources/images/*.jpg', 'public/images') .copy('resources/svg/*.svg', 'public/svg') .browserSync('http://localhost:8000');