Fresh laravel installation without User related controllers - laravel

How can I create fresh laravel project without user-related controllers OR How can I completely and safely drop all things related to it?

Related

Laravel Voyager installation issue

I just finished my first laravel project> Now I only need to install an admin panel. I tried to install Laravel Voyager but I got an issue because I had a role table already created, So it stopped the installation. Is there a way to fix this issue or should I use admin panel, what do you advice me ?
I already had a role table with helpers methods and data that I am currently using. I completely unistall it and I delete all files that I got during the installation.
In the past, I run into the same issue with Voyager, with my previous users and a roles table. Since I had logic already in place for the user's/role table design, what I did was fuse both tables migrations into one. In detail these are the steps I went through to accomplish that:
Create new database for Voyager's installation.
Update.env to access new DB (would be advisable to clear cache after).
Install Voyager php artisan voyager:install (after Voyager vendor was installed using composer).
Copy Voyagers migrations to database/migrations, make your changes, turn off the config option database.autoload_migrations (full guidance for this step can be found in https://voyager-docs.devdojo.com/getting-started/installation#advanced).
Merge conflicting migrations files (in this case the roles table, or any other that can conflict with Voyager's migrations), meaning bringing columns needed from the previous migration into Voyager's migration file.
Delete all tables from the database again (since migrations tables were modified) and run php artisan migrate.
Now you should end-up having the previous roles table (with previous and new Voyagers columns, and definitions), without affecting the Voyager's tables functionality :)

New laravel project without authentication

I am new to laravel and it is baffling me that it just assumes I want a full authentication stack built in every time I create a new project. Is there a way to generate a new project without it adding all of these authentication controllers, classes, etc?
These classes aren't used at all unless you run php artisan make:auth. If you don't want authentication, you're free to safely remove them.
As of Laravel 5.8, there is no way to generate a project without these files.

Use same database for 2 Laravel Apps

I am making a web app on Laravel 5.3 which is frontend app. I am managing data from a Backend App. I have already made models and migrations in the frontend app and not in the backend app. So how should I use same database, models and migrations for both. Please help.
You can just create the models in the backend app and they will still work.
If you are using Artisan:
php artisan make:model ModelName
Migration files can be a little more tricky, I would suggest just managing all of this through your frontend app for consistency and then creating the models you need in the backend app.
You didn't mention if your backend app is also using Laravel.
Either way, I think your best approach would be to structure the backend app as an API. Then it would contain the database migrations and models. The back end would be the one to connect directly with the database. The front end would then fetch the data from the back end API and display them. The front end app could then have its own models too (but not database models).
There are arguments to support both using an API on the front-end app to access the backend or just recreating the models on each system. I'm supporting multiple sites which access the same data. It soon became apparent that the best way was to create an API on the backend to service them all. Also worked for other shared resources i.e. images.
There is a slight penalty in the load times but is so small it isnt worth noting. It also helped when using other platforms i.e. ioS, android and Ajax.
You can rename the migrations table in your bootstrap/app.php like this:
$app->configure('database');
$app->config->set('database.migrations', 'backend_migrations');
That way you will get two migration tables, one for the frontend, and one for the backend all in the same database.

how to use laravel illuminate in a custom project

I have a static site with a lot of pages. Now I got a new requirement. Client need a Client Area, I am thinking to use laravel Database Eloquent, Session, Form/html, Session and want to use them as alias like use in laravel/lumen. The problem is that I want static pages same as it is with .html extension, is there any solution? I want some packages with aliases to speed up.
I spent a complete day on Configuring Input and Eloquent but I wasn't able to setup to other packages. But I don't know how to set aliases and service providers. Any idea?
Specific:
I need Laravel Some packages
Session,
FileSystem
Mail
Input
Database
Html/Form,
Validation
I don't need others packages and need aliases same as laravel used in (config/app)
yes you can use laravel components outside laravel project please read the article : http://www.richardbagshaw.co.uk/using-illuminate-components/

create first user in Laravel 5

This is my first time using Laravel 5. Never experienced with any of other framework like CakePHP, CodeIgniter, Yii, etc. I just know how to use make api REST with slim framework.
I already create a table users as I can't access <<URL>>/home. I create fields and load it some data. Whenever I want to try reset the password, it show error because I dont have table password_resets. What are the steps to be taken after install the Laravel actually.
Thanks
You don't need to create any table manually (and you shouldn't). In Laravel you have migrations that help you quickly create tables in your database and seeds (where you can put initial data to those tables).
In fresh Laravel installation you have 2 ready migrations (for creating users and password_resets tables). All you need to do is running your console, go to directory where you have your Laravel project and run:
php artisan migrate
to run those migrations. After running this command Laravel will create those 2 tables for you. Before, you need to have configured your database connection (look at config/database.php file)

Resources