Clean Laravel To Bake New Project - laravel

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.

Related

How can I use authentication without Bootstrap?

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

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.

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.

Hesitate to remove utility in my laravel 5.5 project

How about, some time ago I had installed this utility to monitor the query results in my application, now I want to remove it, but I do not know how, someone knows how I can deactivate it?
Welcome to StackOverflow!
That bar at the bottom is called the Laravel Debugbar which is found here: https://github.com/barryvdh/laravel-debugbar
It is controlled by a setting in your .env file in the root of your project called APP_DEBUG. Set this to false to hide the bar (recommended for production).
To uninstall it from your project completely, run composer remove barryvdh/laravel-debugbar. Depending on your Laravel version, you may also have to remove the Service Provider from config/app.php (under providers) or remove it from app/Providers/AppServiceProvider.php depending how you originally installed it.
Note: If you're caching your config (by using php artisan config:cache) then don't forget to clear your config cache after changes by running php artisan config:clear.

Resources