Releases: akramghaleb/laravel-nuxt-template
v2.0.1
What's Changed in Release v2
This release introduces significant updates to the routing logic and removes the automatic redirect to /app
. Here's a summary of the changes:
1. Removed Redirect to /app
- The application no longer redirects to
/app
by default. - This simplifies routing and improves flexibility for custom route configurations.
2. Added /admin
& /api
Exceptions
- The router now explicitly handles
/admin
and/api
routes. - These routes are excluded from the catch-all route, ensuring they are not accidentally overridden.
3. Updated Router Configuration
-
The catch-all route has been updated to serve files without redirecting to
/app
. -
Here's an example of the updated router configuration:
Route::get('/{any?}', function ($any = null) { $path = public_path() . '/app/'; $path .= $any ? $any . '/index.html' : 'index.html'; if (File::exists($path)) { return File::get($path); } abort(404); // Return a 404 error if the file doesn't exist })->where('any', '^(?!admin|api).*$');
4. How to Upgrade
If you're upgrading from a previous version, follow these steps:
-
Update Your Routes:
Replace your existing catch-all route with the updated routing logic (see example above). -
Remove
/app
Redirect Logic:
If you previously had logic to redirect requests to/app
, remove it. -
Test Your Application:
After updating your routes, thoroughly test your application to ensure:- The
/admin
and/api
routes work as expected. - The catch-all route serves files correctly without redirecting to
/app
. - No existing functionality is broken.
- The
-
Update Dependencies:
Run the following commands to ensure your dependencies are up-to-date:composer install # Update PHP dependencies npm install # Update Node.js dependencies
-
Commit the Changes:
Once you've verified everything works, commit the changes to your repository:git add . git commit -m "Upgraded to release-v2: Removed /app redirect and added /admin & /api exceptions"
Full Changelog
For a complete list of changes, see the commit history.
Why These Changes?
- Improved Routing: The removal of the
/app
redirect makes the application more intuitive and easier to configure. - Better Separation of Concerns: Explicit handling of
/admin
and/api
routes ensures cleaner and more maintainable code.
Upgrade Instructions for Existing Projects
If you're upgrading from a previous version, ensure your routing logic is updated to reflect these changes. Follow the steps outlined above to seamlessly integrate the new updates.
Feedback
If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.
Enjoy the new updates! 🚀
v2.0.0
This project built with Laravel 11 + Nuxt 3
- This template build with Laravel v11.0 & Nuxt v3.11
- This template Support Pinia State Management
- If you like this work you can see more here
Features
- Technology Stack: This release leverages Laravel version 11.0 for the backend framework and Nuxt version 3.11 for the frontend framework. Laravel provides a robust foundation for developing web applications with its elegant syntax and powerful features, while Nuxt.js enhances the development experience by offering a framework for building server-side rendered Vue.js applications with features like automatic code splitting, hot module replacement, and more.
- State Management: The release incorporates Pinia version 2.1 for state management. Pinia is a modern and lightweight state management solution for Vue.js applications. It provides a simple and intuitive API for managing application state, making it easier to organize and manage complex data in Vue.js applications. With Pinia v2.1, developers can take advantage of improved features and optimizations for state management in their applications.
- Persisted State: The release introduces support for persisted state, allowing for the storage of application state data in the local storage of the user's browser. This feature ensures that user data persists even after the browser is closed or refreshed, enhancing the user experience by providing continuity and preserving important application data. By leveraging local storage, developers can create more resilient and user-friendly applications that remember user preferences and maintain session state across sessions.
v1.0.1
Features
- Technology Stack: This release leverages Laravel version 10.10 for the backend framework and Nuxt version 3.10 for the frontend framework. Laravel provides a robust foundation for developing web applications with its elegant syntax and powerful features, while Nuxt.js enhances the development experience by offering a framework for building server-side rendered Vue.js applications with features like automatic code splitting, hot module replacement, and more.
- State Management: The release incorporates Pinia version 2.1 for state management. Pinia is a modern and lightweight state management solution for Vue.js applications. It provides a simple and intuitive API for managing application state, making it easier to organize and manage complex data in Vue.js applications. With Pinia v2.1, developers can take advantage of improved features and optimizations for state management in their applications.
- Persisted State: The release introduces support for persisted state, allowing for the storage of application state data in the local storage of the user's browser. This feature ensures that user data persists even after the browser is closed or refreshed, enhancing the user experience by providing continuity and preserving important application data. By leveraging local storage, developers can create more resilient and user-friendly applications that remember user preferences and maintain session state across sessions.