I'm a newbie in php / laravel / js libs world. I want to add require.js to my laravel 5.4 project, and some questions are come up.
First: What is the difference between these two lib:
npm install requirejs / npm install laravel-elixir-requirejs? Which one should i use?
Second: What is this elixir for? Why does laravel 5.4 documentation not contain this elixir?
Thanks for the answers in advance!
Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for your Laravel application. Elixir supports common CSS and JavaScript pre-processors like Sass and Webpack. Using method chaining, Elixir allows you to fluently define your asset pipeline.
It's more like micro framework for setting out the work flow and the second npm install requirejs means that npm will install .js where npm install laravel-elixir-requirejs is the js package specifically load js for elxir framework which is an component of laravel.
Related
I want to install a tailwind package for my laravel project.
I write in Terminal: composer require composer require laravel-frontend-presets/tailwindcss --dev
The error is:
Your requirements could not be resolved to an installable set of packages.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I expect to install all packages correctly.
This package looks like the same of Laravel Breeze one of the official starter kit.
I recommend to use Laravel Breeze or Laravel JetStream that are both served with tailwindcss, and you can use both as well with InertiaJS for Server Side Rendering and choosing between VueJS or ReactJS as javascript framework.
Check Out this:
https://laravel.com/docs/9.x/starter-kits
In Laravel, I know running composer require laravel/ui and then php artisan ui vue --auth creates authentication scaffolding but it uses Bootstrap. Is there a way to create this scaffolding without Bootstrap?
Unfortunately and as I know, there is no alternative for the bootstrap UI in laravel authentication scaffolding, as I know there is a tailwind but the last update on the repo was 2 years ago so not sure if it is supported now
https://github.com/laravel-frontend-presets/tailwindcss
also, you can change it or create a new one, all view files in this path
resources/views/auth
if you want use TailWindCss And Compatibility with Laravel V9
You Can Use this package :
Github Repo
It's very simple and I've been using it for a few minutes
I built my application using Vue3, now deploying it to Laravel.
However, I would like to make an administration panel for it, but I do not want to waste time creating a new template for it, but I want to use a ready-made template from the Internet. However, I have a problem because the all of available templates are based on the older version of VueJS 2.X.
What can I do? Can I somehow use two versions of VueJS with Laravel?
To create a Vue app, we need to use a special createApp function instead of ... will still install Vue 2.x and npm i vue#next will install Vue 3.
I've been using create-react-app for quite a while and I recently need to build a backend via laravel. Is it possible to use create-react-app, it's npm run start development workflows, etc to communicate with a laravel backend?
I can see that laravel already has a package.json file and from what I can tell, the react packages do not use create-react-app. I have seen an npm package, but it doesn't appear to be current and is probably not compatible with Laravel 7.x.
That's not needed if you are going to build the SPA and the backend in the same directory structure because laravel has its own workflow using Laravel Mix and you can take advantage of the framework Scaffolding but if you are planning to only connect to an existent Laravel Backend you can create your react app with create-react-app command and connect to laravel using axios,fetch or something like that
I just started learning how to work with a Laravel server and I want to use Vue. But after installing the app.js file only has require('/bootstrap'); in it, shouldn't it have the required components and the const app field?
I used npm install and npm run watch. What am I doing wrong?
Laravel 6 doesn't ship with frontend scaffolding anymore, they shipped that to a new package called Laravel UI so install it and scaffold VueJS
composer require laravel/ui
php artisan ui vue
And if you need the authentication views like login and register
php artisan ui vue --auth
Docs