Laravel wire-elements package - How to use this with bootstrap theme? - laravel

There is this package https://github.com/wire-elements/modal.
i have followed the steps to configure to implement the modal however i use a different CSS framework. My question is where is says :
TailwindCSS
The base modal is made with TailwindCSS. If you use a different CSS framework I recommend that you publish the modal template and change the markup to include the required classes for your CSS framework.
How do i get to do that because my modals are not showing though i have done exactly what is on the documentation i have done the following commands
php artisan vendor:publish --tag=livewire-ui-modal-views
php artisan vendor:publish --tag=livewire-ui-modal-config
set the config/livewire-ui-modal (include CSS) to true

Related

php artisan make:controller is not defined

I am using Laravel Framework 6.20.44, which I can tell from php artisan -V
It comes part of OctoberCMS, which I just updated.
I'm jealous because the documentation for Laravel 6.x, and some many other resources, show that php artisan come with a make command, derived into so many subcommands.
I would like to enjoy a command like php artisan make:controller API/TopicController --api.
I can't, because my version of artisan returns:
Command "make:controller" is not defined.
Did you mean one of these?
create:controller
make:migration
It looks like I have an older version of artisan, heavily coupled to October.
I say coupled because I can spot commands such as october: when I list available artisan commands.
No luck with create:controller either, as --api is not implemented in my version...
My question: how do I update artisan so that I have access to the make command, according to the doco?
October CMS is developed in Laravel and it's not framework. It is CMS.
So, being CMS it has to maintain its directory structure with predefined paths. CMS is driven by plugins and themes. So you can only add/modify plugins or theme files.
So now if you try to add a controller where do it will add? it cants add to its system files OR in app/controllers/. To prevent this the authors of CMS have removed/overrideLaravel native commands to avoid creating the unexpected directory structure or files in core folders.
So basically you need to follow CMS rules and its command to maintain the directory structure and file structure of CMS. It's important otherwise CMS will not work.
php artisan create:controller <Author>:<PluginName> <ControllerName>
this is the exact definition: Create the controller in this plugin by this name. So it can work with CMS core logic.
Check some tutorials to understand how October CMS works:
How to install OctoberCMS
themes
How to edit OctoberCMS
themes
How to install OctoberCMS
plugins
Essential Plugins for
OctoberCMS
If any doubts please comment.

Laravel 8.x Tailwind Prefix

Tailwind allows prefix to be set in tailwind.config.js.
Reference here.
I'm working on a Laravel project that uses Bootstrap and Tailwind simultaneously, managed by npm. I've set a prefix "tw-" for Tailwind to prevent classes colliding.
However, Laravel 8.x uses Tailwind by default unless set to use Bootstrap. Reference here.
Is there any way to let Laravel know about the Tailwind prefix that I set so that it uses the correct Tailwind class names?
Thanks in advance!
I wonder if it's truly necessary to use both tools for css.
Anyways I'm not entirely sure how you're loading the pagination, but you also have the ability to create your own (custom) pagination view.
By running the following code:
php artisan vendor:publish --tag=laravel-pagination
This command will place the views in your application's resources/views/vendor/pagination directory. The tailwind.blade.php file within this directory corresponds to the default pagination view. You may edit this file to modify the pagination HTML.
It might suite your needs a lot more to be able to have the pagination view file customized. Because with this you can recreate the pagination using Tailwind (or Bootstrap) classes.

Laravel 7.3 does not appear to install Vue, the components folder and ExampleComponent.vue are missing

Laravel is said to come with a Vue installation already packaged, but this no longer appears to be the case. Laravel 7.3 doesn't have the components folder and ExampleComponent.vue are missing.
I would like to get Vue running on Laravel.
Any help would be greatly appreciated.
The frontend scaffolding typically provided with previous releases of Laravel has been extracted into a laravel/ui Composer package. This allows the first-party UI scaffolding to be developed and versioned separately from the primary framework. As a result of this change, no Bootstrap or Vue code is present in default framework scaffolding, and the make:auth command has been extracted from the framework as well.
https://laravel.com/docs/6.x/releases#laravel-6
Inorder to generate the Presets read the documentation: https://laravel.com/docs/7.x/frontend
The Bootstrap and Vue scaffolding provided by Laravel is located in the laravel/ui Composer package, which may be installed using Composer:
composer require laravel/ui
Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command:
// Generate basic scaffolding...
php artisan ui bootstrap
php artisan ui vue
php artisan ui react // use this if you need react instead of vue
// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Once done with the vue artisan command, you can find the ExampleComponent.vue and the basic files in the js folder.
Reference
I was able to get Vue working on Laravel using this as the correct example:
https://github.com/connor11528/laravel-vue-spa-tailwindcss

What are the consequences of running php artisan ui a second time in the same project?

I'm new to Laravel. I'm developing an app in Laravel6 using VSCode on Windows 10.
When I started my app, I executed this command:
php artisan ui bootstrap --auth
Then I proceeded to develop my views using bootstrap4. If I executed this command now, after having created various views that used bootstrap, what would happen?
php artisan ui vue --auth
I'm hoping to hear that absolutely nothing will happen to my existing views and the necessary vue modules have simply been installed so that I could proceed to write new views that use vue instead of bootstrap.
But rather than trying it and potentially erasing my bootstrap code (or making it unrunnable because the bootstrap packages have been deleted), I thought I'd ask here. I'm guessing someone here is aware of what will happen if I run php artisan vue a second time for the same project but with a different parameter.
Yes i have tried with commands given by you if i run "php artisan ui vue" it will only replace those files which has been generated by command and if run "php artisan ui vue --auth" it will ask me whether or not i want to replace those files means "yes/no" in a terminal.

Clean Laravel To Bake New Project

I just did a fresh install of Laravel v5.5.25. I want to create a brand new project so I want to clear out some files in Laravel. For example, I want to delete all readymade templates (welcome page too), delete bootstrap from Laravel, etc. I just want to do ultimate start. So, will you please guide me what else should I delete too to make it a skeleton? And please tell me how can I remove bootstrap completely and replace it with Bulma.
You can run:
php artisan preset none
to remove default preset.
There is no Bulma preset of of the box, available options are:
none
bootstrap
vue
react
You can use Laravel Presets for that. If you want a “skeleton” as you said you should use php artisan preset none. There is also one for Bulma: composer require laravel-frontend-presets/bulma and then php artisan preset bulma.

Resources