Getting a laravel script ready for clients - laravel

I'm developing a paid application that is based on laravel. I want ideas about how to package the app and how to decrease laravel file size and get rid of all laravel components that is of no use on production/every case, for example: Boris , Predis and maybe Swift email .. What is the proper way to remove them and what other parts of laravel can be removed with no effects?
Scripts could be used in shared hosting or by people with minimum and tech knowledge .. So, it should be easy for them

Related

Laravel Debugbar with laravel api routes

I have a Laravel API.
The front end application is completely separate from Laravel.
All Laravel routes are located in routes/api.php
Is there any way to make the Laravel Debugbar work in this case?
https://github.com/barryvdh/laravel-debugbar
barryvdh/laravel-debugbar needs to be installed on your Laravel project (actually all debuggers need to be present within the project to audit every request) and get its files served to the frontend to work (edit repsonses with Middleware/InjectDebugbar.php).
I won't say that it is impossible to get its insights on a separate front, who knows if you are ready to fork the project and communicate with the debug bar APIs.
For a simpler alternatives you can use:
laravel/telescope docs repo
Clockwork browser extension website repo
spatie/laravel-ray(paid) website docs

Vue and Laravel separate app - Need feedback on architecture

I need a bit of expert feedback on this please as I do not want to start my project in the wrong way.
I would like to keep my Vue code separated from Laravel, the reason being, I may use this vue app later on on Cordova.
First question:
I understand how to host the Laravel API and Vue app on 2 different domains, no problems at all but I am unsure on how to setup the folder when both apps are on the same domain.
I know that Laravel should be hosted below the public_html folder and have a symlink to the public folder for security purpose. But where should my vue app goes?
Second question:
When I save images from Vue(as I am creating a blog) the images are going to the Laravel store/images folder, so each time I want to show an article in my vue app, the API must each time request the content(text and images) from the Laravel API, is this fine? Will the Google bot be able to trigger the API request when requesting the content?(I actually never thought of this...)
Thank you so much!

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/

gradually migrate application from codeigniter to Laravel

I have a quite large application written in Codeigniter 1.7.
It needs some significant enhancements and I have been evaluating Laravel 4 as the PHP framework.
I am trying to find out if anyone has successfully extended an existing Codeigniter application using Laravel so that some screens are Laravel and some are Codeigniter.
I imagine that authentication (currently using Ion Auth) and Session management (using mysql backend) would be two major hurdles to overcome.
If this is an option then I will explore in more detail as the amount of legacy code needing transferring is considerable.
Thanks in advance.
I suppose in your Laravel routes file, create a route for every page you have written in CodeIgniter. Route everything to the URL that CodeIgniter is expecting and as you complete portions in Laravel, change the routes to point to the correct ones Laravel expects as you go.
Before you do anything though, I'd get everything you need for authentication finished in Laravel, turn authentication off in CodeIgniter, and just let Laravel handle that in the routes.

Resources