I've just started working api in Laravel and this is my first project. I've used Laravel 8 and php 7.4. used mysql database. used postman for testing api. used Laravel dusk for testing. used Laravel ui for authentication. used Laravel sanctum for authentication.
- You'll find That I've installed UnoCSS, that was too as a test there is only a little of ppl that have installed it with Laravel.
- Used Laravel pint for styling and formatting the code.
- Used Larastan for static analysis.
- Used Scribe to document the api.
-
install NodeJS, then install UnoCSS with this command
npm install -D unocss
. -
create a file called
uno.config.js
and put this code inside it.
import {
defineConfig,
presetAttributify,
presetUno,
presetIcons,
} from "unocss"; // install and add ny preset you want
export default defineConfig({
presets: [presetUno(), presetAttributify(), presetIcons()],
});
- in your
vite.config.js
file you need to add this code inside the "plugins
".
UnoCSS({ content: { filesystem: ["./resources/views/**/*.blade.php"] },}),
- in your
resources -> js -> app.js
file you need to add this code.
import "virtual:uno.css";
- That's it, you can now use UnoCSS in your project.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.