using Composer only gives you a clean Laravel backend, and you can connect with other frontend framework separately: It setting up Laravel purely as a backend — meaning:
- It runs PHP and serves APIs (routes like /api/...).
- It uses MySQL, Eloquent models, controllers, etc.
- It can serve JSON data to any frontend.
- Laragon
- Laravel Herd: https://herd.laravel.com/windows
Can go to MySQL to open HeidiSQL
Documentation Link: https://laravel.com/docs/11.x/blade#blade-directives
Have to refer to Thread-safe php version
- Contains raw, uncompiled assets:
- CSS (e.g., SCSS/SASS)
- JavaScript (e.g., ES6, Vue/React components)
- Images you might process
- These files are not directly accesible via URL
- They need to be compiled or copied to the public/folder before the brower can load them
- The only folder accessible directly by the browser.
- Any file you want to load with , <script>, or
must be in public/.
- The URL for the browser corresponds to the path in public/:
2️⃣ How assets flow in Laravel
1)You write raw assets in resources/ (e.g., resources/css/app.css). 2)You run Laravel Mix / Vite to compile assets:
npm run dev # development npm run build # production
3)Compiled assets are output to public/ (default public/css, public/js). 4)The browser accesses only the files in public/.
3️⃣ Why not serve directly from resources/
1)resources/ is not web-accessible for security reasons. 2) If you expose resources/ to the web, users could see your uncompiled source code, config files, or even secrets accidentally. 3) Laravel is designed so that only public/ is the document root. 4) Think of resources/ as your “workspace” and public/ as your “live website folder” that the web server can serve.
The browser will go to the root URL (/)
Works exactly the same as using a named route, just less flexible if the URL changes later
Route::get('/', function () {
return view('customer.index');
})->name('home');