Courses

React.js + Laravel: SPA CRUD with Auth

Install Laravel + React: Load First Static Text from React

avatar

How do I start this on my linux system. I used php artisan serve but I am not seeing the output of js file. Kindly help as I am kind of stuck on this part

avatar

I wouldn't use php artisan serve for any serious project. You need a proper web server, like Homestead, Laravel Sai, Laravel Valet or similar.

avatar

Thanks for your feedback. A thought came to mind after I read your comment. Could you do a video on each of them, their pros and cons and on which operating system they can run on.

avatar

I can't do that unfortunately, as I haven't tested all of them personally and I use only one operating system which is MacOS. So I'm not qualified to talk about pros and cons, you need to read their docs and online reviews about them.

avatar

Thanks I have successfully installed Laravel Homestead. However when I run "npm run dev" I get a bunch of errors. A section of the errors are below. Please can you be of help in resolving this:

(node:20418) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 485) (node:20418) UnhandledPromiseRejectionWarning: Error: ENOSPC: System limit for number of file watchers reached, watch '/home/vagrant/code/lareact/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub' at FSWatcher.

avatar

I have successfully installed Laravel Sail and also Laravel breeze. When I run "sail npm run dev". It gives the output below

dev vite

VITE v3.2.3 ready in 416 ms

➜ Local: http://localhost:5173/ ➜ Network: http://172.18.0.7:5173/ (!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

LARAVEL v9.38.0 plugin v0.6.1

➜ APP_URL: http://localhost

But it stops at the above part and I cannot also find the webpack.min.js. Can you please help out, what might I be doing wrong?
avatar

To be honest, I haven't used Laravel Sail myself so can't really help or comment. With webpack, there shouldn't be webpack these days, default in Laravel is Vite now, please watch this video. This course was created before Webpack changed to Vite.

avatar

Hi, I'm using Laravel 10 and the process for installing Breeze seems to have changed. There's different options to choose from and I'm not sure which ones to pick in order to be able to follow this course. Do you have any recommendations?

avatar

All good, got it working with the "blade" option when installing Breeze